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
get_rotationGet the rotation as a DQuat from the given scene object.
get_translationGet the translation as a DVec3 from the given scene object.
removeRemove the current transform from the scene node.
rotate_xRotate the given scene object on the X-axis in-place by a certain angle.
rotate_yRotate the given scene object on the Y-axis in-place by a certain angle.
rotate_zRotate the given scene object on the Z-axis in-place by a certain angle.
setSet a TransformSchema for the given NodeSchema
set_rotationSet the rotation of the given scene object in the world.
set_translationChange the translation of the given scene object in the world.
translateTranslate the given scene object in the world by a set amount.
translate_xTranslate the given scene object on the X-axis.
translate_yTranslate the given scene object on the Y-axis.
translate_zTranslate the given scene object on the Z-axis.

get

def get(
    *,
    node: types.scene.Node,
    _transaction_id: str | None = None
) -> types.scene.Transform | None

Get the TransformSchema of the given NodeSchema if one exists

Returns Transform | None.

node : Node

NodeSchema to get the TransformSchema of

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

get_rotation

def get_rotation(
    *,
    node: types.scene.Node,
    _transaction_id: str | None = None
) -> types.math.Quat

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

Returns Quat.

node : Node

The shape to query.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

get_translation

def get_translation(
    *,
    node: types.scene.Node,
    _transaction_id: str | None = None
) -> types.math.Vec3

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

Returns Vec3.

node : Node

The shape to query.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

remove

def remove(*, node: types.scene.Node, _transaction_id: str | None = None) -> None

Remove the current transform from the scene node.

Returns None.

node : Node

The scene node, rather than an internal render entity.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

rotate_x

def rotate_x(
    *,
    node: types.scene.Node,
    angle: float,
    _transaction_id: str | None = None
) -> None

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

Returns None.

node : Node

The NodeSchema to transform.

angle : float

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

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

rotate_y

def rotate_y(
    *,
    node: types.scene.Node,
    angle: float,
    _transaction_id: str | None = None
) -> None

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

Returns None.

node : Node

The NodeSchema to transform.

angle : float

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

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

rotate_z

def rotate_z(
    *,
    node: types.scene.Node,
    angle: float,
    _transaction_id: str | None = None
) -> None

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

Returns None.

node : Node

The NodeSchema to transform.

angle : float

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

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

set

def set(
    *,
    node: types.scene.Node,
    transform: types.scene.Transform,
    _transaction_id: str | None = None
) -> None

Set a TransformSchema for the given NodeSchema

Returns None.

node : Node

NodeSchema to change the TransformSchema of

transform : Transform

The new TransformSchema

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

set_rotation

def set_rotation(
    *,
    node: types.scene.Node,
    rotation: types.math.Quat,
    _transaction_id: str | None = None
) -> None

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

Returns None.

node : Node

The NodeSchema to transform.

rotation : Quat

The new rotation to give to the shape.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

set_translation

def set_translation(
    *,
    node: types.scene.Node,
    translation: types.math.Vec3,
    _transaction_id: str | None = None
) -> None

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

Returns None.

node : Node

The NodeSchema to transform.

translation : Vec3

The new position to give to the shape.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

translate

def translate(
    *,
    node: types.scene.Node,
    translation: types.math.Vec3,
    _transaction_id: str | None = None
) -> None

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

Returns None.

node : Node

The NodeSchema to transform.

translation : Vec3

Translate the shape.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

translate_x

def translate_x(
    *,
    node: types.scene.Node,
    translation: float,
    _transaction_id: str | None = None
) -> None

Translate the given scene object on the X-axis.

Returns None.

node : Node

The NodeSchema to transform.

translation : float

Translate the shape on the X-axis.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

translate_y

def translate_y(
    *,
    node: types.scene.Node,
    translation: float,
    _transaction_id: str | None = None
) -> None

Translate the given scene object on the Y-axis.

Returns None.

node : Node

The NodeSchema to transform.

translation : float

Translate the shape on the Y-axis.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.

translate_z

def translate_z(
    *,
    node: types.scene.Node,
    translation: float,
    _transaction_id: str | None = None
) -> None

Translate the given scene object on the Z-axis.

Returns None.

node : Node

The NodeSchema to transform.

translation : float

Translate the shape on the Z-axis.

_transaction_id optional : str | None

Transaction to join. Omit to submit without an explicit transaction. Defaults to None.