English中文

DebugCameraPrimitive

new Cesium.DebugCameraPrimitive(options)

Draws the outline of the camera's view frustum.
名称 Name 类型 Type 说明 Description
options object 具有以下属性的对象: Object with the following properties:
名称 Name 类型 Type 默认值 Default 说明 Description
camera Camera 相机。 The camera.
frustumSplits Array.<number> 可选 optional 到相机视锥体的近平面和远平面的距离。这会覆盖相机的视锥体近处和远处值。 Distances to the near and far planes of the camera frustums. This overrides the camera's frustum near and far values.
color Color Color.CYAN 可选 optional 调试轮廓的颜色。 The color of the debug outline.
updateOnChange boolean true 可选 optional 当底层相机发生变化时,图元是否更新。 Whether the primitive updates when the underlying camera changes.
show boolean true 可选 optional 确定是否显示该原语。 Determines if this primitive will be shown.
id object 可选 optional 选取实例时要返回的用户定义对象 A user-defined object to return when the instance is picked with Scene#pick.
示例: Example:
primitives.add(new Cesium.DebugCameraPrimitive({
  camera : camera,
  color : Cesium.Color.YELLOW
}));

成员 Members

选取图元时返回的用户定义值。 User-defined value returned when the primitive is picked.
默认值: Default Value: undefined
另见: See:
确定是否显示该原语。 Determines if this primitive will be shown.
默认值: Default Value: true

方法 Methods

销毁该对象持有的 WebGL 资源。销毁对象可以确定性地释放 WebGL 资源,而不是依赖垃圾收集器来销毁该对象。 Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

一旦对象被销毁,就不应再使用;调用除 Once an object is destroyed, it should not be used; calling any function other than isDestroyed 将导致 will result in a DeveloperError 例外。因此,分配返回值( exception. Therefore, assign the return value (undefined) 到对象,如示例中所做的那样。 ) to the object as done in the example.

抛出: Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
示例: Example:
p = p && p.destroy();
另见: See:
如果该对象被销毁则返回 true;否则为假。 Returns true if this object was destroyed; otherwise, false.

如果该对象被破坏,则不应使用它;调用除 If this object was destroyed, it should not be used; calling any function other than isDestroyed 将导致 will result in a DeveloperError exception.

返回: Returns:
true 如果该物体被摧毁;否则, if this object was destroyed; otherwise, false.
另见: See:
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.