Camera ScreenSpaceCameraController - 相机操控器

Free Mode : 默认相机控制。
Drone Mode : 让相机跟随无人机通过飞行在一个固定的距离。
自由模式不需要代码,因为它使用默认控件。至于无人机跟随模式,我们可以使用摄像机的内置实体跟踪功能来定位摄像机,并用偏移量定位无人机。这就使得相机即使在移动时也能从指定的实体中得到固定的偏移量。为了跟踪一个实体,我们简单地设置viewer.trackedEntity。

Cesium中相机操控类Scene\ScreenSpaceCameraController.js , 依赖关系如下图所示。

 

 SceneMode定义了场景的几种模式:

有以下几种:

/**
* Morphing between mode, e.g., 3D to 2D.
* 3D 与 2D 模式之间渐变
*/
MORPHING: 0,

/**
* Columbus View mode. A 2.5D perspective view where the map is laid out
* flat and objects with non-zero height are drawn above it.
* 哥伦布视图模式。 一个地图平铺的2.5D透视视图
*/
COLUMBUS_VIEW: 1,

/**
* 2D mode. The map is viewed top-down with an orthographic projection.
* 2D模式。 地图从顶向下的平行投影视图
*/
SCENE2D: 2,

/**
* 3D mode. A traditional 3D perspective view of the globe.
* 3D模式。 一个传统的基于3D透视模式的地球视图
*/
SCENE3D: 3,

IntersectionTests :计算几何对象之间 如:射线、平面、三角形、球体等之间的相交测试。

TweenCollection: 实现了两个对象之间自动插值和动态变化

SceneTransforms: SceneTransforms

 

posted on 2022-06-06 17:40  3D入魔  阅读(411)  评论(0编辑  收藏  举报