Skip to content

scene.transform

Read and change scene-node position and orientation.

14 functions / 0 types

Index

FunctionDescription
getGet the TransformSchema of the given NodeSchema if one exists
getRotationGet the rotation as a DQuat from the given scene object.
getTranslationGet the translation as a DVec3 from the given scene object.
removeRemove the current transform from the scene node.
rotateXRotate the given scene object on the X-axis in-place by a certain angle.
rotateYRotate the given scene object on the Y-axis in-place by a certain angle.
rotateZRotate the given scene object on the Z-axis in-place by a certain angle.
setSet a TransformSchema for the given NodeSchema
setRotationSet the rotation of the given scene object in the world.
setTranslationChange the translation of the given scene object in the world.
translateTranslate the given scene object in the world by a set amount.
translateXTranslate the given scene object on the X-axis.
translateYTranslate the given scene object on the Y-axis.
translateZTranslate the given scene object on the Z-axis.

get

get(args: { node: SceneNode }, transactionId?: string): Promise<SceneTransform | undefined>

Get the TransformSchema of the given NodeSchema if one exists

Returns Promise<SceneTransform | undefined>.

node : SceneNode

NodeSchema to get the TransformSchema of

transactionId optional : string

getRotation

getRotation(args: { node: SceneNode }, transactionId?: string): Promise<MathQuat>

Get the rotation as a DQuat from the given scene object.

Returns: A double-precision quaternion, holding a rotation.

Returns Promise<MathQuat>.

node : SceneNode

The shape to query.

transactionId optional : string

getTranslation

getTranslation(args: { node: SceneNode }, transactionId?: string): Promise<MathVec3>

Get the translation as a DVec3 from the given scene object.

Returns: A double-precision 3-vector, holding a position, a direction or an extent.

Returns Promise<MathVec3>.

node : SceneNode

The shape to query.

transactionId optional : string

remove

remove(args: { node: SceneNode }, transactionId?: string): Promise<void>

Remove the current transform from the scene node.

Returns Promise<void>.

node : SceneNode

The scene node, rather than an internal render entity.

transactionId optional : string

rotateX

rotateX(args: { angle: number; node: SceneNode }, transactionId?: string): Promise<void>

Rotate the given scene object on the X-axis in-place by a certain angle.

Returns Promise<void>.

angle : number

The angle (in radians) to rotate the shape by.

node : SceneNode

The NodeSchema to transform.

transactionId optional : string

rotateY

rotateY(args: { angle: number; node: SceneNode }, transactionId?: string): Promise<void>

Rotate the given scene object on the Y-axis in-place by a certain angle.

Returns Promise<void>.

angle : number

The angle (in radians) to rotate the shape by.

node : SceneNode

The NodeSchema to transform.

transactionId optional : string

rotateZ

rotateZ(args: { angle: number; node: SceneNode }, transactionId?: string): Promise<void>

Rotate the given scene object on the Z-axis in-place by a certain angle.

Returns Promise<void>.

angle : number

The angle (in radians) to rotate the shape by.

node : SceneNode

The NodeSchema to transform.

transactionId optional : string

set

set(args: { node: SceneNode; transform: SceneTransform }, transactionId?: string): Promise<void>

Set a TransformSchema for the given NodeSchema

Returns Promise<void>.

node : SceneNode

NodeSchema to change the TransformSchema of

transform : SceneTransform

The new TransformSchema

transactionId optional : string

setRotation

setRotation(args: { node: SceneNode; rotation: MathQuat }, transactionId?: string): Promise<void>

Set the rotation of the given scene object in the world.

Returns Promise<void>.

node : SceneNode

The NodeSchema to transform.

rotation : MathQuat

The new rotation to give to the shape.

transactionId optional : string

setTranslation

setTranslation(args: { node: SceneNode; translation: MathVec3 }, transactionId?: string): Promise<void>

Change the translation of the given scene object in the world.

Returns Promise<void>.

node : SceneNode

The NodeSchema to transform.

translation : MathVec3

The new position to give to the shape.

transactionId optional : string

translate

translate(args: { node: SceneNode; translation: MathVec3 }, transactionId?: string): Promise<void>

Translate the given scene object in the world by a set amount.

Returns Promise<void>.

node : SceneNode

The NodeSchema to transform.

translation : MathVec3

Translate the shape.

transactionId optional : string

translateX

translateX(args: { node: SceneNode; translation: number }, transactionId?: string): Promise<void>

Translate the given scene object on the X-axis.

Returns Promise<void>.

node : SceneNode

The NodeSchema to transform.

translation : number

Translate the shape on the X-axis.

transactionId optional : string

translateY

translateY(args: { node: SceneNode; translation: number }, transactionId?: string): Promise<void>

Translate the given scene object on the Y-axis.

Returns Promise<void>.

node : SceneNode

The NodeSchema to transform.

translation : number

Translate the shape on the Y-axis.

transactionId optional : string

translateZ

translateZ(args: { node: SceneNode; translation: number }, transactionId?: string): Promise<void>

Translate the given scene object on the Z-axis.

Returns Promise<void>.

node : SceneNode

The NodeSchema to transform.

translation : number

Translate the shape on the Z-axis.

transactionId optional : string