mirror of
https://github.com/halpz/re3.git
synced 2025-07-22 01:19:48 +00:00
minor stuff
This commit is contained in:
@ -60,6 +60,7 @@ public:
|
||||
}
|
||||
|
||||
void Slerp(const CQuaternion &q1, const CQuaternion &q2, float theta, float invSin, float t);
|
||||
void Set(RwV3d *axis, float angle);
|
||||
void Get(RwMatrix *matrix);
|
||||
};
|
||||
|
||||
|
@ -183,6 +183,17 @@ CQuaternion::Slerp(const CQuaternion &q1, const CQuaternion &q2, float theta, fl
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CQuaternion::Set(RwV3d *axis, float angle)
|
||||
{
|
||||
float halfCos = Cos(angle*0.5f);
|
||||
float halfSin = Sin(angle*0.5f);
|
||||
x = axis->x*halfSin;
|
||||
y = axis->y*halfSin;
|
||||
z = axis->z*halfSin;
|
||||
w = halfCos;
|
||||
}
|
||||
|
||||
void
|
||||
CQuaternion::Get(RwMatrix *matrix)
|
||||
{
|
||||
|
Reference in New Issue
Block a user