Dual Quaternion (i.e Rotation & Translation) Library for c++
This library was build for Quaternion & Dual Quaternion Calculation Tutorial.
Name | Type | Description |
---|---|---|
Create | std::array |
Create Quaternion Rotation, Angle in Degree |
Conjugate | std::array |
Quaternion Conjugate |
Normalize | double | Normalize Quaternion , Unit Quaternion = 1 |
Add | std::array |
Add Two Quaternions |
Subtract | std::array |
Subtract Two Quaternions |
Multiply | std::array |
Multiply Two Quaternions |
MultiplyScalar | std::array |
Multiply Quaternion with scalar value |
Name | Type | Description |
---|---|---|
Create | std::array |
Create Dual Quaternion Rotation and Translation, Angle in Degree |
Rotation | std::array |
Return Dual Quaternion Pure Rotation |
Translation | std::array |
Return Vector Quaternion Translation |
Conjugate | std::array |
Dual Quaternion Conjugate |
Add | std::array |
Add Two Dual Quaternions |
Subtract | std::array |
Subtract Two Dual Quaternions |
Multiply | std::array |
Multiply Two Dual Quaternions |
Create a quaternion rotation based on the equation below :
where :
Example :
double Angle = 90; //in Degrees
std::array
std::array
Quaternion1 = Quaternion::Create(Angle,DirectionOfRotation);
Return Quaternion Conjugate based on the equation below :
Example :
Quaternion::Conjugate(Quaternion1);
Return Quaternion Normalize based on the equation below :
Note : Normalize Unit Quaternion will return 1
Example :
Quaternion::Normalize(Quaternion1);
Add two Quaternions (P + Q) based on the equation below :
Example :
Quaternion::Add(Quaternion1,Quaternion2);
This library used std::array<>
Any improvment are appreciated