绘制由转换为世界坐标(即地球的 WGS84 坐标)的矩阵定义的参考系的轴。最突出的例子是原语 Draws the axes of a reference frame defined by a matrix that transforms to world coordinates, i.e., Earth's WGS84 coordinates. The most prominent example is a primitives
modelMatrix.
X轴为红色; Y 为绿色; Z 是蓝色的。 The X axis is red; Y is green; and Z is blue.
这仅用于调试;它没有针对生产用途进行优化。 This is for debugging only; it is not optimized for production use.
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
可选 optional
具有以下属性的对象: Object with the following properties:
|
示例: Example:
primitives.add(new Cesium.DebugModelMatrixPrimitive({
modelMatrix : primitive.modelMatrix, // primitive to debug
length : 100000.0,
width : 10.0
}));
成员 Members
选取图元时返回的用户定义值。 User-defined value returned when the primitive is picked.
-
默认值: Default Value:
undefined
另见: See:
轴的长度(以米为单位)。 The length of the axes in meters.
-
默认值: Default Value:
10000000.0
modelMatrix : Matrix4
定义参考系的 4x4 矩阵,即原点加轴,以进行可视化。 The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
-
默认值: Default Value:
Matrix4.IDENTITY
确定是否显示该原语。 Determines if this primitive will be shown.
-
默认值: Default Value:
true
轴的宽度(以像素为单位)。 The width of the axes in pixels.
-
默认值: Default Value:
2.0
方法 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.
