Transform

3d transform: scale + translation + rotation

static if(ENABLE_OPENGL)
static if(BACKEND_GUI)
class Transform : RefCountedObject {}

Constructors

this
this()
Undocumented in source.

Members

Functions

invalidateTransform
void invalidateTransform()
Undocumented in source. Be warned that the author may not have intended to support it.
lookAt
void lookAt(vec3 eye, vec3 center, vec3 up)
Undocumented in source. Be warned that the author may not have intended to support it.
rotate
void rotate(float angle, vec3 axis)

rotate around custom axis

rotateX
void rotateX(float angle)

rotate around X axis

rotateY
void rotateY(float angle)

rotate around Y axis

rotateZ
void rotateZ(float angle)

rotate around Z axis

scale
void scale(vec3 value)

scale by vector

scale
void scale(float value)

scale all axis by the same values

scaleX
void scaleX(float value)

scale X

scaleY
void scaleY(float value)

scale Y

scaleZ
void scaleZ(float value)

scale Z

setIdentity
void setIdentity()

set transform to identity transform

translate
void translate(vec3 value)

translate by vector

translateX
void translateX(float value)

translate X

translateY
void translateY(float value)

translate Y

translateZ
void translateZ(float value)

translate Z

Properties

matrix
const(mat4) matrix [@property getter]

get transform matrix, recalculates if needed

matrix
const(mat4) matrix [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
scaling
const(vec3) scaling [@property getter]

get scale vector

scaling
vec3 scaling [@property setter]

set scale vector

scaling
float scaling [@property setter]

set scale vector x, y, z to the same value

scalingX
float scalingX [@property getter]

get scale X

scalingX
float scalingX [@property setter]

set scale X

scalingY
float scalingY [@property getter]

get scale Y

scalingY
float scalingY [@property setter]

set scale Y

scalingZ
float scalingZ [@property getter]

get scale Z

scalingZ
float scalingZ [@property setter]

set scale Z

translation
const(vec3) translation [@property getter]

get translation vector

translation
vec3 translation [@property setter]

set translation vector

translation
float translation [@property setter]

set translation vector x, y, z to the same value

translationX
float translationX [@property getter]

get translation X

translationX
float translationX [@property setter]

set translation x

translationY
float translationY [@property getter]

get translation Y

translationY
float translationY [@property setter]

set translation y

translationZ
float translationZ [@property getter]

get translation Z

translationZ
float translationZ [@property setter]

set translation z

Variables

_dirtyTransform
bool _dirtyTransform;
Undocumented in source.
_hasRotation
bool _hasRotation;
Undocumented in source.
_hasScale
bool _hasScale;
Undocumented in source.
_hasTranslation
bool _hasTranslation;
Undocumented in source.
_matrix
mat4 _matrix;
Undocumented in source.
_rotation
mat4 _rotation;
Undocumented in source.
_scale
vec3 _scale;
Undocumented in source.
_translation
vec3 _translation;
Undocumented in source.

Inherited Members

From RefCountedObject

_refCount
int _refCount;

count of references to this object from Ref

refCount
int refCount [@property getter]

returns current value of reference counter

addRef
void addRef()

increments reference counter

releaseRef
void releaseRef()

decrement reference counter, destroy object if no more references left

~this
~this()
Undocumented in source.

Meta