【model move】监听帧
view.clock.onTick.addEventListener((clock)=>{if(flag.moveUp){if(flag.moveLeft){hpRoll.heading -= radian;}if(flag.moveRight){hpRoll.heading += radian;}moveCar(true);}if(flag.moveDown){if(flag.moveLeft){hpRoll.heading -= radian;}if(flag.moveRight){hpRoll.heading += radian;}moveCar(false);}});// 移动小车function moveCar(isUP) {// 计算速度矩阵if(isUP>0){speedVector = Cesium.Cartesian3.multiplyByScalar(Cesium.Cartesian3.UNIT_X,speed,speedVector);}else{speedVector = Cesium.Cartesian3.multiplyByScalar(Cesium.Cartesian3.UNIT_X,-speed,speedVector);}// 根据速度计算出下一个位置的坐标position = Cesium.Matrix4.multiplyByPoint(carPrimitive.modelMatrix ,speedVector, position);// 小车移动Cesium.Transforms.headingPitchRollToFixedFrame(position, hpRoll, Cesium.Ellipsoid.WGS84, fixedFrameTransforms, carPrimitive.modelMatrix);}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
完整代码
- Stealing Large Language Models: 关于对ChatG
- 接触器自锁线是哪根
- C++高级编程-高级特性
- 语音基石模型Speech Foundation Models
- 熊猫餐厅
- 天文爱好者新手必读:三大主流品牌天文望远镜选购指南 中国十大望远镜品牌
- 古埃及早就接触高科技了钻孔技术发达
- Xilinx ISE 联合 modelsim 进行功能和时序仿真
- ISE14.7联合Modelsim10.1a设置
- PyTorch图像分割模型——segmentation_models_pytor