Struct Trs¶
Namespace: Apogee.Core.Numerics
Assembly: Apogee.Core.dll
A placement in the double-precision world: a
public struct Trs
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
Trs(Double3, Quaternion, Vector3)¶
A placement in the double-precision world: a
public Trs(Double3 position, Quaternion rotation, Vector3 scale)
Parameters¶
position Double3
rotation Quaternion
scale Vector3
Fields¶
Identity¶
public static readonly Trs Identity
Field Value¶
Position¶
public Double3 Position
Field Value¶
Rotation¶
public Quaternion Rotation
Field Value¶
Scale¶
public Vector3 Scale
Field Value¶
Methods¶
InLocalOf(in Trs)¶
The inverse of parent (the transform an entity needs under a new parent to stay where it is). The
position is subtracted in double, so a far-away placement stays exact; it is exact under the conditions
public readonly Trs InLocalOf(in Trs parent)
Parameters¶
parent Trs
Returns¶
InWorldOf(in Trs)¶
This placement seen from parent's space, as a world placement: the child's own transform inside the parent's.
public readonly Trs InWorldOf(in Trs parent)
Parameters¶
parent Trs
Returns¶
InverseTransformPoint(Double3)¶
A point of the outer space in this placement's local space. The subtraction is done in double, so a far-away placement stays exact.
public readonly Vector3 InverseTransformPoint(Double3 point)
Parameters¶
point Double3
Returns¶
ToMatrix(Double3)¶
The float matrix for the GPU, with the translation taken relative to origin (the camera): row-vector, scale
first, then rotation, then translation, as
public readonly Matrix4x4 ToMatrix(Double3 origin)
Parameters¶
origin Double3
Returns¶
TransformPoint(Vector3)¶
A point of this placement's local space in the space around it.
public readonly Double3 TransformPoint(Vector3 local)
Parameters¶
local Vector3
Returns¶
TransformVector(Vector3)¶
A vector (a difference, not a position) scaled and rotated, without the translation.
public readonly Vector3 TransformVector(Vector3 local)
Parameters¶
local Vector3