DebugModelMatrixPrimitive

new Cesium.DebugModelMatrixPrimitive(options)

绘制由变换为世界坐标的矩阵定义的参考系的坐标轴,例如地球的WGS84坐标。最突出的例子是图元的 modelMatrix 。

X轴为红色; Y是绿色; Z是蓝色。

这仅用于调试;尚未针对生产用途进行优化。

Name Type Description
options Object optional 具有下列属性的对象:
Name Type Default Description
length Number 10000000.0 optional 坐标轴的长度,以米为单位。
width Number 2.0 optional 轴的宽度(以像素为单位)。
modelMatrix Matrix4 Matrix4.IDENTITY optional 定义参考框架(即原点和轴)的4x4矩阵,以便可视化。
show Boolean true optional 确定是否显示此图元。
id Object optional 使用Scene#pick选择实例时返回的用户定义对象。
Example:
primitives.add(new Cesium.DebugModelMatrixPrimitive({
  modelMatrix : primitive.modelMatrix,  // primitive to debug
  length : 100000.0,
  width : 10.0
}));

Members

选择图元时返回的用户定义值。
Default Value: undefined
See:
坐标轴的长度,以米为单位。
Default Value: 10000000.0
定义参考框架(即原点和轴)的4x4矩阵,以便可视化。
Default Value: Matrix4.IDENTITY
确定是否显示此图元。
Default Value: true
轴的宽度,以像素为单位。
Default Value: 2.0

Methods

销毁此对象持有的WebGL资源。

一旦对象被销毁,它将不能在使用; 调用除isDestroyed之外的任何函数都会导致DeveloperError异常。 因此,将返回值(undefined)赋给对象,如示例所示。
Throws:
Example:
p = p && p.destroy();
See:

isDestroyed()Boolean

如果该对象没被销毁,返回false。

如果该对象已经被销毁, 使用isDestroyed 会触发 DeveloperError 异常.
Returns:
false
See: