scene.transform
Read and change scene-node position and orientation.
14 functions / 0 types
Index
| Function | Description |
|---|---|
| get | Get the TransformSchema of the given NodeSchema if one exists |
| getRotation | Get the rotation as a DQuat from the given scene object. |
| getTranslation | Get the translation as a DVec3 from the given scene object. |
| remove | Remove the current transform from the scene node. |
| rotateX | Rotate the given scene object on the X-axis in-place by a certain angle. |
| rotateY | Rotate the given scene object on the Y-axis in-place by a certain angle. |
| rotateZ | Rotate the given scene object on the Z-axis in-place by a certain angle. |
| set | Set a TransformSchema for the given NodeSchema |
| setRotation | Set the rotation of the given scene object in the world. |
| setTranslation | Change the translation of the given scene object in the world. |
| translate | Translate the given scene object in the world by a set amount. |
| translateX | Translate the given scene object on the X-axis. |
| translateY | Translate the given scene object on the Y-axis. |
| translateZ | Translate 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