Welcome to Python-flavored Magnum! Please note that, while already being
rather stable, this functionality is still considered experimental and
some APIs might get changed without preserving full backwards compatibility.
class
Object2DTwo-dimensional object with TRS-based transformation implementation
Methods
- def absolute_transformation(self, /) -> Matrix3
- Transformation relative to the root object
- def absolute_transformation_matrix(self, /) -> Matrix3
- Transformation matrix relative to the root object
- def reset_transformation(self, /) -> None
- Reset the transformation
- def rotate(self, arg0: Rad, /) -> None
- Rotate the object
- def rotate_local(self, arg0: Rad, /) -> None
- Rotate the object as a local transformation
- def scale(self, arg0: Vector2, /) -> None
- Scale the object
- def scale_local(self, arg0: Vector2, /) -> None
- Scale the object as a local transformation
- def transformation_matrix(self, /) -> Matrix3
- Transformation matrix
- def translate(self, arg0: Vector2, /) -> None
- Translate the object
- def translate_local(self, arg0: Vector2, /) -> None
- Translate the object as a local transformation
Special methods
Properties
- parent: Object2D get set
- Parent object or None if this is the root object
- rotation get set
- Object rotation
- scaling: Vector2 get set
- Object scaling
- scene: Scene2D get
- Scene or None if the object is not a part of any scene
- transformation: Matrix3 get set
- Object transformation
- translation: Vector2 get set
- Object translation