Appearance
KBE3D / KBCore / Cesium / DebugModelMatrixPrimitive
类: DebugModelMatrixPrimitive
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 <code>modelMatrix</code>. <p> The X axis is red; Y is green; and Z is blue. </p> <p> This is for debugging only; it is not optimized for production use. </p>
示例
ts
primitives.add(new Cesium.DebugModelMatrixPrimitive({
modelMatrix : primitive.modelMatrix, // primitive to debug
length : 100000.0,
width : 10.0
}));参数
Object with the following properties:
参数
The length of the axes in meters.
参数
The width of the axes in pixels.
参数
The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
参数
Determines if this primitive will be shown.
参数
A user-defined object to return when the instance is picked with Scene#pick
属性
length
length:
number
The length of the axes in meters.
width
width:
number
The width of the axes in pixels.
show
show:
boolean
Determines if this primitive will be shown.
modelMatrix
modelMatrix:
Matrix4
The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
id
id:
any
User-defined value returned when the primitive is picked.
方法
isDestroyed()
isDestroyed():
boolean
Returns true if this object was destroyed; otherwise, false. <p> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. </p>
返回
boolean
true if this object was destroyed; otherwise, false.
destroy()
destroy():
void
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. <p> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example. </p>
返回
void
示例
ts
p = p && p.destroy();构造函数
构造函数
new DebugModelMatrixPrimitive(
options?: {length?:number;width?:number;modelMatrix?:Matrix4;show?:boolean;id?:any; }):DebugModelMatrixPrimitive
参数
options?
length?
number
width?
number
modelMatrix?
show?
boolean
id?
any
返回
DebugModelMatrixPrimitive
