Aardvark.Base


Trafo3dExtensions

Static members

Static memberDescription
Decompose(...)
Signature: (trafo:Trafo3d * scale:byref<V3d> * rotation:byref<V3d> * translation:byref<V3d>) -> unit

Decomposes a transformation into a scale, rotation and translation component. NOTE: The input is assumed to be a valid affine transformation. The rotation output is in Euler-Angles (yaw, pitch, roll).

GetModelOrigin(trafo)
Signature: trafo:Trafo3d -> V3d

Extracts the translation component of the given transformation, which when given a model transformation represents the model origin in world position.

GetOrthoNormalOrientation(trafo)
Signature: trafo:Trafo3d -> Trafo3d

Builds an ortho-normal orientation transformation form the given transform. Scale and Translation will be removed and basis vectors will be ortho-normalized. NOTE: The X-Axis is untouched and Y/Z are forced to a normal-angle.

GetScale(trafo)
Signature: trafo:M44d -> float

Approximates the uniform scale value of the given transformation (average length of basis vectors).

GetScale(trafo)
Signature: trafo:Trafo3d -> float

Approximates the uniform scale value of the given transformation (average length of basis vectors).

GetScaleVector(trafo)
Signature: trafo:M44d -> V3d

Extracts a scale vector from the given matrix by calculating the lengths of the basis vectors. NOTE: The extraction only gives absolute value (negative scale will be ignored)

GetScaleVector(trafo)
Signature: trafo:Trafo3d -> V3d

Extracts a scale vector from the given matrix by calculating the lengths of the basis vectors.

GetViewDirectionLH(trafo)
Signature: trafo:Trafo3d -> V3d

Extracts the Z-Axis from the given transformation. NOTE: A left-handed coordinates system transformation is expected, where the view-space z-axis points in forward direction.

GetViewDirectionRH(trafo)
Signature: trafo:Trafo3d -> V3d

Extracts the Z-Axis from the given transformation. NOTE: A right-handed coordinates system transformation is expected, where the view-space z-axis points opposit the forward vector.

GetViewPosition(trafo)
Signature: trafo:Trafo3d -> V3d

Extracts the inverse/backward translation component of the given transformation, which when given a view transformation represents the location of the camera in world space.

Fork me on GitHub