Remove unused vm_vector_2_matrix_norm

This commit is contained in:
Kp 2013-06-30 23:38:37 +00:00
parent 58d6a2f92a
commit 25acc19932
2 changed files with 0 additions and 70 deletions

View file

@ -405,12 +405,6 @@ vms_matrix * vm_vec_ang_2_matrix (vms_matrix * m, vms_vector * v, fixang a);
//returns ptr to matrix
vms_matrix * vm_vector_2_matrix (vms_matrix * m, vms_vector * fvec, vms_vector * uvec, vms_vector * rvec);
//this version of vector_2_matrix requires that the vectors be more-or-less
//normalized and close to perpendicular
vms_matrix * vm_vector_2_matrix_norm (vms_matrix * m, vms_vector * fvec, vms_vector * uvec, vms_vector * rvec);
//rotates a vector through a matrix. returns ptr to dest vector
//dest CANNOT equal either source
vms_vector * vm_vec_rotate (vms_vector * dest, const vms_vector * src, const vms_matrix * m);

View file

@ -681,70 +681,6 @@ bad_vector2:
}
//quicker version of vm_vector_2_matrix() that takes normalized vectors
vms_matrix *vm_vector_2_matrix_norm(vms_matrix *m,vms_vector *fvec,vms_vector *uvec,vms_vector *rvec)
{
vms_vector *xvec=&m->rvec,*yvec=&m->uvec,*zvec=&m->fvec;
Assert(fvec != NULL);
if (uvec == NULL) {
if (rvec == NULL) { //just forward vec
bad_vector2:
;
if (zvec->x==0 && zvec->z==0) { //forward vec is straight up or down
m->rvec.x = f1_0;
m->uvec.z = (zvec->y<0)?f1_0:-f1_0;
m->rvec.y = m->rvec.z = m->uvec.x = m->uvec.y = 0;
}
else { //not straight up or down
xvec->x = zvec->z;
xvec->y = 0;
xvec->z = -zvec->x;
vm_vec_normalize(xvec);
vm_vec_crossprod(yvec,zvec,xvec);
}
}
else { //use right vec
vm_vec_crossprod(yvec,zvec,xvec);
//normalize new perpendicular vector
if (vm_vec_normalize(yvec) == 0)
goto bad_vector2;
//now recompute right vector, in case it wasn't entirely perpendiclar
vm_vec_crossprod(xvec,yvec,zvec);
}
}
else { //use up vec
vm_vec_crossprod(xvec,yvec,zvec);
//normalize new perpendicular vector
if (vm_vec_normalize(xvec) == 0)
goto bad_vector2;
//now recompute up vector, in case it wasn't entirely perpendiclar
vm_vec_crossprod(yvec,zvec,xvec);
}
return m;
}
//rotates a vector through a matrix. returns ptr to dest vector
//dest CANNOT equal source
vms_vector *vm_vec_rotate(vms_vector *dest,const vms_vector *src,const vms_matrix *m)