Mail Archives: djgpp/1996/11/30/04:49:08
On Thu, 28 Nov 1996 18:27:41 GMT, aclemmer AT juno DOT com (Aaron M Clemmer)
wrote:
>void xform_vector(matrix m, vector svect, vector *result)
>{
> result->x = FixedMul(m[0][0], svect.x) +
> FixedMul(m[0][1], svect.y) +
> FixedMul(m[0][2], svect.z) + m[0][3];
>.. (more of the same)
>}
>
>And I'm calling the code like this:
>(cube is an array of vectors)
>
>xform_vector(transmatrix, cube[i], &vtemp);
Presumably you have declared:
matrix transmatrix;
vector vtemp,cube[num_cubes];
Other than that, I can't see any errors. Posting the typedef, struct
and variable declarations would be helpful.
gf
- Raw text -