gameObjects.attachables.transform#
- class gameObjects.attachables.transform.Transform(context: EmberEngine, gameObject: GameObject, translate=[0.0, 0.0, 0.0], rotation=[0.0, 0.0, 0.0], scale=[1.0, 1.0, 1.0], name: str = '', local_callback=None)#
Bases:
object- __init__(context: EmberEngine, gameObject: GameObject, translate=[0.0, 0.0, 0.0], rotation=[0.0, 0.0, 0.0], scale=[1.0, 1.0, 1.0], name: str = '', local_callback=None) None#
- compose_matrix(position, quat, scale) Matrix44#
- euler_to_quat(euler, order=None) Quaternion#
- extract_euler(mat: Matrix44 = None) Vector3#
- extract_position(mat: Matrix44 = None) Vector3#
- extract_quat(mat: Matrix44 = None)#
- extract_scale(mat: Matrix44 = None) Vector3#
- property local_position#
- property local_rotation#
- property local_scale#
- property position#
Get current position in world space
world transforms are not stored, it is always computed from the latest model matrix A persistent proxy Transform.VectorInterface instance:
dats is updated on every access
writes are forwarded to set_position() - as list
allows writes from scripts and editor gui
- quat_to_euler(q: Quaternion, order=None) Vector3#
Convert quaternion to Euler angles using current ENGINE_ROTATION
- property rotation#
Get current rotation in world space
world transforms are not stored, it is always computed from the latest model matrix A persistent proxy Transform.VectorInterface instance:
dats is updated on every access
writes are forwarded to set_rotation() - as list
allows writes from scripts and editor gui
- safe_asin(x)#
- property scale#
Get current scale in world space
world transforms are not stored, it is always computed from the latest model matrix A persistent proxy Transform.VectorInterface instance:
dats is updated on every access
writes are forwarded to set_scale() - as list
allows writes from scripts and editor gui
- set_local_position(data: list)#
Lambda wrapper
- set_local_rotation(data: list)#
Lambda wrapper
- set_local_scale(data: list)#
Lambda wrapper
- set_position(data: list) None#
Lambda/Proxy wrapper
- set_rotation(data: list) None#
Lambda/Proxy wrapper
- set_scale(data: list) None#
Lambda/Proxy wrapper
- static vec_to_degrees(v)#
- static vec_to_radians(v)#