Class Transform

3d transform: scale + translation + rotation

Inherits from

  • Object (base class)

Constructors

Name Description
this

Fields

Name Type Description
_dirtyTransform bool
_hasRotation bool
_hasScale bool
_hasTranslation bool
_matrix mat4
_rotation mat4
_scale vec3
_translation vec3

Properties

Name Type Description
matrix [get] const(mat4) get transform matrix, recalculates if needed
scaling [set] const(vec3) set scale vector
scaling [set] float set scale vector x, y, z to the same value
scaling [get] const(vec3) get scale vector
scalingX [set] float set scale X
scalingX [get] float get scale X
scalingY [get] float get scale Y
scalingY [set] float set scale Y
scalingZ [get] float get scale Z
scalingZ [set] float set scale Z
translation [get] const(vec3) get translation vector
translation [set] inout(vec3) set translation vector
translation [set] float set translation vector x, y, z to the same value
translationX [get] float get translation X
translationX [set] float set translation x
translationY [get] float get translation Y
translationY [set] float set translation y
translationZ [get] float get translation Z
translationZ [set] float set translation z

Methods

Name Description
rotate rotate around custom axis
rotateX rotate around X axis
rotateY rotate around Y axis
rotateZ rotate around Z axis
scale scale by vector
scale scale all axis by the same values
scaleX scale X
scaleY scale Y
scaleZ scale Z
setIdentity set transform to identity transform
translate translate by vector
translateX translate X
translateY translate Y
translateZ translate Z
invalidateTransform

Authors

Copyright

License