struct MAGES::DualQuaternions::DualQuaternion¶
Overview¶
DualQuaternion Definition and Operations. More…
struct DualQuaternion { // fields Quaternion Real; Quaternion Dual; // properties DualQuaternion Zero; DualQuaternion Normalized; Vector3 Translation; Quaternion Rotation; DualQuaternion Conjugate; DualQuaternion Log; DualQuaternion Exp; // methods DualQuaternion(Quaternion areal, Quaternion adual); DualQuaternion(Vector3 position, Quaternion rotation); DualQuaternion Pow(float t); Vector3 TransformPosition(Vector3 position); Vector3 TransformVector(Vector3 vector); DualQuaternion Sclerp(DualQuaternion other, float t); DualQuaternion Lerp(DualQuaternion other, float t); static DualQuaternion operator + (DualQuaternion a, DualQuaternion b); static DualQuaternion operator * (DualQuaternion a, DualQuaternion b); static DualQuaternion operator * (float a, DualQuaternion b); static float Sinc(float x); static float Norm(Quaternion q); static Quaternion QConjugate(Quaternion q); static Quaternion QExp(Quaternion q); static Quaternion QLog(Quaternion q); static Quaternion Add(Quaternion a, Quaternion b); static Quaternion Sub(Quaternion a, Quaternion b); static Quaternion Scale(Quaternion b, float a); static float Dot(Quaternion a, Quaternion b); };
Detailed Documentation¶
DualQuaternion Definition and Operations.
Fields¶
Quaternion Real
DualQuaternion Real Part.
Quaternion Dual
DualQuaternion Dual Part.
Properties¶
DualQuaternion Zero
Gets a new DualQuaternion Identity.
DualQuaternion Normalized
Gets DualQuaternion Normalized.
Vector3 Translation
Gets DualQuaternion Translation.
Quaternion Rotation
Gets DualQuaternion Rotation.
DualQuaternion Conjugate
Gets DualQuaternion Conjugate.
DualQuaternion Log
Gets DualQuaternion Inverse.
DualQuaternion Exp
Gets DualQuaternion Exponential.
Methods¶
DualQuaternion(Quaternion areal, Quaternion adual)
Initializes a new instance of the DualQuaternion struct.
Parameters:
areal |
Real part. |
adual |
Dual part. |
DualQuaternion(Vector3 position, Quaternion rotation)
Initializes a new instance of the DualQuaternion struct.
Parameters:
position |
Position. |
rotation |
Rotation. |
DualQuaternion Pow(float t)
Pow function for DualQuaternion.
Parameters:
t |
Power (float). |
Returns:
DualQuaternion ^t.
Vector3 TransformPosition(Vector3 position)
Gets DualQuaternion TransformPosition.
Parameters:
position |
Position. |
Returns:
The new translated position.
Vector3 TransformVector(Vector3 vector)
Gets DualQuaternion TransformVector.
Parameters:
vector |
Vector3 to transform vector. |
Returns:
Vector3.
DualQuaternion Sclerp(DualQuaternion other, float t)
Gets DualQuaternion Sclerp.
Parameters:
other |
Sclerp dquat. |
t |
Power. |
Returns:
DualQuaternion.
DualQuaternion Lerp(DualQuaternion other, float t)
Gets DualQuaternion Lerp.
Parameters:
other |
From. |
t |
Lerpt factor. |
Returns:
DualQuaternion lerp.
static DualQuaternion operator + (DualQuaternion a, DualQuaternion b)
Operator to add two DualQuaternions.
Parameters:
a |
First object to add. |
b |
Second object to add. |
Returns:
Returns a+b.
static DualQuaternion operator * (DualQuaternion a, DualQuaternion b)
Operator to multiply two DualQuaternions.
Parameters:
a |
First object to multiply. |
b |
Second object to multiply. |
Returns:
Returns a*b.
static DualQuaternion operator * (float a, DualQuaternion b)
Operator to multiply a DualQuaternion by a scalar.
Parameters:
a |
Float to multiply. |
b |
Second object to multiply. |
Returns:
Returns (float a) * b.
static float Sinc(float x)
DualQuaternion Sinc.
Parameters:
x |
Float. |
Returns:
Float result.
static float Norm(Quaternion q)
Norm of a Quaternion.
Parameters:
q |
Quaternion. |
Returns:
Quaternion norm.
static Quaternion QConjugate(Quaternion q)
Computes the conjugate of a quaternion.
Parameters:
q |
The input quaternion. |
Returns:
The conjugate of the input quaternion.
static Quaternion QExp(Quaternion q)
Computes the exponential of a quaternion.
Parameters:
q |
The input quaternion. |
Returns:
The exponential of the input quaternion.
static Quaternion QLog(Quaternion q)
Computes the logarithm of a quaternion.
Parameters:
q |
The input quaternion. |
Returns:
The logarithm of the input quaternion.
static Quaternion Add(Quaternion a, Quaternion b)
Adds two quaternions together.
Parameters:
a |
The first quaternion. |
b |
The second quaternion. |
Returns:
The sum of the two input quaternions.
static Quaternion Sub(Quaternion a, Quaternion b)
Subtracts one quaternion from another.
Parameters:
a |
The first quaternion (minuend). |
b |
The second quaternion (subtrahend). |
Returns:
The difference between the two input quaternions.
static Quaternion Scale(Quaternion b, float a)
Scales a quaternion by a scalar value.
Parameters:
b |
The quaternion to scale. |
a |
The scalar value. |
Returns:
The scaled quaternion.
static float Dot(Quaternion a, Quaternion b)
Computes the dot product of two quaternions.
Parameters:
a |
The first quaternion. |
b |
The second quaternion. |
Returns:
The dot product of the two input quaternions.