Add float variant to pie_RotateTranslate
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5118 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
7744c514b5
commit
1bc654f8b5
|
@ -381,3 +381,14 @@ void pie_RotateTranslate3iv(const Vector3i *v, Vector3i *s)
|
|||
s->y = ( v->x * psMatrix->c + v->z * psMatrix->f + v->y * psMatrix->i
|
||||
+ psMatrix->l ) / FP12_MULTIPLIER;
|
||||
}
|
||||
|
||||
|
||||
void pie_RotateTranslate3f(const Vector3f *v, Vector3f *s)
|
||||
{
|
||||
s->x = ( v->x * psMatrix->a + v->z * psMatrix->d + v->y * psMatrix->g
|
||||
+ psMatrix->j ) / FP12_MULTIPLIER;
|
||||
s->z = ( v->x * psMatrix->b + v->z * psMatrix->e + v->y * psMatrix->h
|
||||
+ psMatrix->k ) / FP12_MULTIPLIER;
|
||||
s->y = ( v->x * psMatrix->c + v->z * psMatrix->f + v->y * psMatrix->i
|
||||
+ psMatrix->l ) / FP12_MULTIPLIER;
|
||||
}
|
||||
|
|
|
@ -41,12 +41,22 @@ extern SDWORD aSinTable[];
|
|||
|
||||
/*!
|
||||
* Rotate and translate v with the worldmatrix. Store the result in s
|
||||
* int variant
|
||||
* \param[in] v Vector to translate
|
||||
* \param[out] s Resulting vector
|
||||
*/
|
||||
void pie_RotateTranslate3iv(const Vector3i *v, Vector3i *s);
|
||||
|
||||
|
||||
/*!
|
||||
* Rotate and translate v with the worldmatrix. Store the result in s
|
||||
* Float variant
|
||||
* \param[in] v Vector to translate
|
||||
* \param[out] s Resulting vector
|
||||
*/
|
||||
void pie_RotateTranslate3f(const Vector3f *v, Vector3f *s);
|
||||
|
||||
|
||||
/*!
|
||||
* Calculate surface normal
|
||||
* Eg. if a polygon (with n points in clockwise order) normal is required,
|
||||
|
@ -72,7 +82,7 @@ static inline WZ_DECL_CONST WZ_DECL_WARN_UNUSED_RESULT
|
|||
a = Vector3f_Normalise(a);
|
||||
b = Vector3f_Normalise(b);
|
||||
|
||||
{ // MSVC hack
|
||||
{ // MSVC HACK
|
||||
Vector3f
|
||||
v = {
|
||||
(a.y * b.z) - (a.z * b.y),
|
||||
|
|
Loading…
Reference in New Issue