DebugModelMatrixPrimitive

new Cesium.DebugModelMatrixPrimitive(options)

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.

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:
Name Type Default Description
length Number 10000000.0 optional The length of the axes in meters.
width Number 2.0 optional The width of the axes in pixels.
modelMatrix Matrix4 Matrix4.IDENTITY optional The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
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.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
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

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:

isDestroyed()Boolean

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.