Reference Source
public class | source

SceneModelTransform

A dynamically-updatable transform within a SceneModel.

Member Summary

Public Members
public

id: *

Unique ID of this SceneModelTransform.

public set

Sets the SceneModelTransform's transform matrix.

Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].

public get

Gets the SceneModelTransform's transform matrix.

Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].

public get

meshes: []: *

The SceneModelMeshes transformed by this SceneModelTransform.

public get

The optional parent SceneModelTransform.

public set

Sets the SceneModelTransform's local translation.

Default value is [0,0,0].

public get

Gets the SceneModelTransform's translation.

Default value is [0,0,0].

public set

Sets the SceneModelTransform's rotation quaternion.

Default value is [0,0,0,1].

public get

Gets the SceneModelTransform's rotation quaternion.

Default value is [0,0,0,1].

public set

Sets the SceneModelTransform's rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

Default value is [0,0,0].

public get

Gets the SceneModelTransform's rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

Default value is [0,0,0].

public set

Sets the SceneModelTransform's scale.

Default value is [1,1,1].

public get

Gets the SceneModelTransform's scale.

Default value is [1,1,1].

public get

Gets the SceneModelTransform's World matrix.

Method Summary

Public Methods
public

rotate(axis: Number[], angle: Number): *

Rotates the SceneModelTransform about the given axis by the given increment.

public

rotateOnWorldAxis(axis: Number[], angle: Number): *

Rotates the SceneModelTransform about the given World-space axis by the given increment.

public

rotateX(angle: Number): *

Rotates the SceneModelTransform about the local X-axis by the given increment.

public

rotateY(angle: Number): *

Rotates the SceneModelTransform about the local Y-axis by the given increment.

public

rotateZ(angle: Number): *

Rotates the SceneModelTransform about the local Z-axis by the given increment.

public

translate(axis: Number[], distance: Number): *

Translates the SceneModelTransform along the local axis by the given increment.

public

translateX(distance: Number): *

Translates the SceneModelTransform along the local X-axis by the given increment.

public

translateY(distance: Number): *

Translates the SceneModelTransform along the local Y-axis by the given increment.

public

translateZ(distance: Number): *

Translates the SceneModelTransform along the local Z-axis by the given increment.

Public Members

public id: * source

Unique ID of this SceneModelTransform.

The SceneModelTransform is registered against this ID in SceneModel#transforms.

public set matrix: Number[] source

Sets the SceneModelTransform's transform matrix.

Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].

public get matrix: Number[] source

Gets the SceneModelTransform's transform matrix.

Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].

public get meshes: []: * source

The SceneModelMeshes transformed by this SceneModelTransform.

Return:

[]

public get parentTransform: SceneModelTransform source

The optional parent SceneModelTransform.

public set position: Number[] source

Sets the SceneModelTransform's local translation.

Default value is [0,0,0].

public get position: Number[] source

Gets the SceneModelTransform's translation.

Default value is [0,0,0].

public set quaternion: Number[] source

Sets the SceneModelTransform's rotation quaternion.

Default value is [0,0,0,1].

public get quaternion: Number[] source

Gets the SceneModelTransform's rotation quaternion.

Default value is [0,0,0,1].

public set rotation: Number[] source

Sets the SceneModelTransform's rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

Default value is [0,0,0].

public get rotation: Number[] source

Gets the SceneModelTransform's rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

Default value is [0,0,0].

public set scale: Number[] source

Sets the SceneModelTransform's scale.

Default value is [1,1,1].

public get scale: Number[] source

Gets the SceneModelTransform's scale.

Default value is [1,1,1].

public get worldMatrix: Number[] source

Gets the SceneModelTransform's World matrix.

Properties:

NameTypeAttributeDescription
worldMatrix *

Public Methods

public rotate(axis: Number[], angle: Number): * source

Rotates the SceneModelTransform about the given axis by the given increment.

Params:

NameTypeAttributeDescription
axis Number[]

Local axis about which to rotate.

angle Number

Angle increment in degrees.

Return:

*

public rotateOnWorldAxis(axis: Number[], angle: Number): * source

Rotates the SceneModelTransform about the given World-space axis by the given increment.

Params:

NameTypeAttributeDescription
axis Number[]

Local axis about which to rotate.

angle Number

Angle increment in degrees.

Return:

*

public rotateX(angle: Number): * source

Rotates the SceneModelTransform about the local X-axis by the given increment.

Params:

NameTypeAttributeDescription
angle Number

Angle increment in degrees.

Return:

*

public rotateY(angle: Number): * source

Rotates the SceneModelTransform about the local Y-axis by the given increment.

Params:

NameTypeAttributeDescription
angle Number

Angle increment in degrees.

Return:

*

public rotateZ(angle: Number): * source

Rotates the SceneModelTransform about the local Z-axis by the given increment.

Params:

NameTypeAttributeDescription
angle Number

Angle increment in degrees.

Return:

*

public translate(axis: Number[], distance: Number): * source

Translates the SceneModelTransform along the local axis by the given increment.

Params:

NameTypeAttributeDescription
axis Number[]

Normalized local space 3D vector along which to translate.

distance Number

Distance to translate along the vector.

Return:

*

public translateX(distance: Number): * source

Translates the SceneModelTransform along the local X-axis by the given increment.

Params:

NameTypeAttributeDescription
distance Number

Distance to translate along the X-axis.

Return:

*

public translateY(distance: Number): * source

Translates the SceneModelTransform along the local Y-axis by the given increment.

Params:

NameTypeAttributeDescription
distance Number

Distance to translate along the Y-axis.

Return:

*

public translateZ(distance: Number): * source

Translates the SceneModelTransform along the local Z-axis by the given increment.

Params:

NameTypeAttributeDescription
distance Number

Distance to translate along the Z-axis.

Return:

*