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 |
| get_rotation | Get the rotation as a DQuat from the given scene object. |
| get_translation | Get the translation as a DVec3 from the given scene object. |
| remove | Remove the current transform from the scene node. |
| rotate_x | Rotate the given scene object on the X-axis in-place by a certain angle. |
| rotate_y | Rotate the given scene object on the Y-axis in-place by a certain angle. |
| rotate_z | Rotate the given scene object on the Z-axis in-place by a certain angle. |
| set | Set a TransformSchema for the given NodeSchema |
| set_rotation | Set the rotation of the given scene object in the world. |
| set_translation | Change the translation of the given scene object in the world. |
| translate | Translate the given scene object in the world by a set amount. |
| translate_x | Translate the given scene object on the X-axis. |
| translate_y | Translate the given scene object on the Y-axis. |
| translate_z | Translate the given scene object on the Z-axis. |
get
def get(
*,
node: types.scene.Node,
_transaction_id: str | None = None
) -> types.scene.Transform | NoneGet 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.QuatGet 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.Vec3Get 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) -> NoneRemove 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
) -> NoneRotate 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
) -> NoneRotate 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
) -> NoneRotate 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
) -> NoneSet 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
) -> NoneSet 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
) -> NoneChange 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
) -> NoneTranslate 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
) -> NoneTranslate 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
) -> NoneTranslate 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
) -> NoneTranslate 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.