Basis

3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x, y, and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized. Almost always used as orthogonal basis for a Transform.

For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).

struct Basis {}

Constructors

this
this(Vector3 row0, Vector3 row1, Vector3 row2)
Undocumented in source.
this
this(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz)
Undocumented in source.
this
this(Vector3 p_euler)
Undocumented in source.
this
this(Quat p_quat)
Undocumented in source.
this
this(Vector3 p_axis, real_t p_phi)
Undocumented in source.

Members

Functions

determinant
real_t determinant()
Undocumented in source. Be warned that the author may not have intended to support it.
diagonalize
Basis diagonalize()
Undocumented in source. Be warned that the author may not have intended to support it.
getAxis
Vector3 getAxis(int p_axis)
Undocumented in source. Be warned that the author may not have intended to support it.
getColumn
Vector3 getColumn(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
getEuler
Vector3 getEuler()
Undocumented in source. Be warned that the author may not have intended to support it.
getMainDiagonal
Vector3 getMainDiagonal()
Undocumented in source. Be warned that the author may not have intended to support it.
getOrthogonalIndex
int getOrthogonalIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
getRow
Vector3 getRow(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
getScale
Vector3 getScale()
Undocumented in source. Be warned that the author may not have intended to support it.
inverse
Basis inverse()
Undocumented in source. Be warned that the author may not have intended to support it.
invert
void invert()
Undocumented in source. Be warned that the author may not have intended to support it.
isEqualApprox
bool isEqualApprox(Basis a, Basis b)
Undocumented in source. Be warned that the author may not have intended to support it.
isOrthogonal
bool isOrthogonal()
Undocumented in source. Be warned that the author may not have intended to support it.
isRotation
bool isRotation()
Undocumented in source. Be warned that the author may not have intended to support it.
isSymmetric
bool isSymmetric()
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Basis opBinary(Basis p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Basis opBinary(Basis p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Basis opBinary(Basis p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Basis opBinary(real_t p_val)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(Basis other)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
const(Vector3) opIndex(int axis)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
Vector3 opIndex(int axis)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Basis p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Basis p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Basis p_matrix)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(real_t p_val)
Undocumented in source. Be warned that the author may not have intended to support it.
orthonormalize
void orthonormalize()
Undocumented in source. Be warned that the author may not have intended to support it.
orthonormalized
Basis orthonormalized()
Undocumented in source. Be warned that the author may not have intended to support it.
quat
Quat quat()
Undocumented in source. Be warned that the author may not have intended to support it.
rotate
void rotate(Vector3 p_axis, real_t p_phi)
Undocumented in source. Be warned that the author may not have intended to support it.
rotated
Basis rotated(Vector3 p_axis, real_t p_phi)
Undocumented in source. Be warned that the author may not have intended to support it.
scale
void scale(Vector3 p_scale)
Undocumented in source. Be warned that the author may not have intended to support it.
scaled
Basis scaled(Vector3 p_scale)
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(real_t xx, real_t xy, real_t xz, real_t yx, real_t yy, real_t yz, real_t zx, real_t zy, real_t zz)

String opCast(T : String)() const { String s; // @Todo return s; }

setAxis
void setAxis(int p_axis, Vector3 p_value)
Undocumented in source. Be warned that the author may not have intended to support it.
setEuler
void setEuler(Vector3 p_euler)
Undocumented in source. Be warned that the author may not have intended to support it.
setOrthogonalIndex
void setOrthogonalIndex(int p_index)
Undocumented in source. Be warned that the author may not have intended to support it.
setRow
void setRow(int i, Vector3 p_row)
Undocumented in source. Be warned that the author may not have intended to support it.
tdotx
real_t tdotx(Vector3 v)
Undocumented in source. Be warned that the author may not have intended to support it.
tdoty
real_t tdoty(Vector3 v)
Undocumented in source. Be warned that the author may not have intended to support it.
tdotz
real_t tdotz(Vector3 v)
Undocumented in source. Be warned that the author may not have intended to support it.
transpose
void transpose()
Undocumented in source. Be warned that the author may not have intended to support it.
transposeXform
Basis transposeXform(Basis m)
Undocumented in source. Be warned that the author may not have intended to support it.
transposed
Basis transposed()
Undocumented in source. Be warned that the author may not have intended to support it.
xform
Vector3 xform(Vector3 p_vector)
Undocumented in source. Be warned that the author may not have intended to support it.
xformInv
Vector3 xformInv(Vector3 p_vector)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_ortho_bases
Basis[24] _ortho_bases;
Undocumented in source.

Variables

elements
Vector3[3] elements;
Undocumented in source.

Meta