Transform class
Defines the position, scale and rotation of an item.
Every Transform
can be assigned to a BaseItem.parent which allows hierarchical editing of their position, scale and rotation.
Created hierarchies are displayed in the Item Hierarchy tab.
Methods
apply | (self, other: ReadonlyTransform) -> Transform |
Additively applies values of another |
|
compose | (self, other: ReadonlyTransform) -> Transform |
Returns a new |
|
copy | (self) -> Transform |
Inherited from ReadonlyTransform. Returns a copy of this |
|
invert | (self) -> Transform |
Inverts all values of this |
|
local_to_world_point | (self, position: Vector3) -> Vector3 |
Inherited from ReadonlyTransform. Converts local |
|
local_to_world_vector | (self, direction: Vector3) -> Vector3 |
Inherited from ReadonlyTransform. Converts local |
|
look_at | (self, world_position: Vector3, world_up: Vector3) -> Transform |
Rotates this |
|
look_at | (self, world_position: Vector3) -> Transform |
Rotates this |
|
mult_scale | (self, scale_factor: float) -> Transform |
Multiplies this |
|
rotate | (self, origin: Vector3, axis: Vector3, angle_in_radians: float) -> Transform |
Rotates this |
|
rotate | (self, axis: Vector3, angle_in_radians: float) -> Transform |
Rotates this |
|
rotate_local | (self, offset: Vector3, axis: Vector3, angle_in_radians: float) -> Transform |
Rotates this |
|
rotate_local | (self, axis: Vector3, angle_in_radians: float) -> Transform |
Rotates this |
|
set | (self, transform: ReadonlyTransform) -> Transform |
Sets values of this |
|
set_direction | (self, direction: Vector3, world_up: Vector3) -> Transform |
Rotates this |
|
set_direction | (self, direction: Vector3) -> Transform |
Rotates this |
|
swap_yz | (self) -> Transform |
Swaps |
|
translate | (self, translation: Vector3) -> Transform |
Moves this |
|
translate_local | (self, translation: Vector3) -> Transform |
Moves this |
|
world_to_local_point | (self, position: Vector3) -> Vector3 |
Inherited from ReadonlyTransform. Converts world |
|
world_to_local_vector | (self, direction: Vector3) -> Vector3 |
Inherited from ReadonlyTransform. Converts world |
Properties
readonly | axis_x | Vector3 |
Inherited from ReadonlyTransform. Red axis of this |
readonly | axis_y | Vector3 |
Inherited from ReadonlyTransform. Green axis of this |
readonly | axis_z | Vector3 |
Inherited from ReadonlyTransform. Blue axis of this |
readonly | forward | Vector3 |
Inherited from ReadonlyTransform. Shorthand for |
position | Vector3 |
Position of this |
|
readonly | right | Vector3 |
Inherited from ReadonlyTransform. Shorthand for |
rotation | Quat |
Rotation of this |
|
scale | float |
Scale of this |
|
readonly | up | Vector3 |
Inherited from ReadonlyTransform. Shorthand for |