version 1.1 | | version 1.2 |
---|
| | |
* Interrogation functions for segment data structure. | | * Interrogation functions for segment data structure. |
* | | * |
* $Log$ | | * $Log$ |
* Revision 1.1 1999/06/14 22:04:21 donut | | * Revision 1.2 1999/09/02 13:37:06 sekmu |
* Initial revision | | * remove warning in editor compile |
| | * |
| | * Revision 1.1.1.1 1999/06/14 22:04:21 donut |
| | * Import of d1x 1.37 source. |
* | | * |
* Revision 2.0 1995/02/27 11:35:21 john | | * Revision 2.0 1995/02/27 11:35:21 john |
* Version 2.0! No anonymous unions, Watcom 10.0, with no need | | * Version 2.0! No anonymous unions, Watcom 10.0, with no need |
| | |
// and a side destside, return the rotation matrix which describes the orientation for the side. | | // and a side destside, return the rotation matrix which describes the orientation for the side. |
void set_matrix_based_on_side(vms_matrix *rotmat,int destside) | | void set_matrix_based_on_side(vms_matrix *rotmat,int destside) |
{ | | { |
vms_angvec rotvec; | | vms_angvec rotvec,*tmpvec; |
vms_matrix r1,rtemp; | | vms_matrix r1,rtemp; |
| | |
switch (destside) { | | switch (destside) { |
case WLEFT: | | case WLEFT: |
vm_angvec_make(&rotvec,0,0,-16384); | | tmpvec=vm_angvec_make(&rotvec,0,0,-16384); |
vm_angles_2_matrix(&r1,&rotvec); | | vm_angles_2_matrix(&r1,&rotvec); |
vm_matrix_x_matrix(&rtemp,rotmat,&r1); | | vm_matrix_x_matrix(&rtemp,rotmat,&r1); |
*rotmat = rtemp; | | *rotmat = rtemp; |
break; | | break; |
| | |
case WTOP: | | case WTOP: |
vm_angvec_make(&rotvec,-16384,0,0); | | tmpvec=vm_angvec_make(&rotvec,-16384,0,0); |
vm_angles_2_matrix(&r1,&rotvec); | | vm_angles_2_matrix(&r1,&rotvec); |
vm_matrix_x_matrix(&rtemp,rotmat,&r1); | | vm_matrix_x_matrix(&rtemp,rotmat,&r1); |
*rotmat = rtemp; | | *rotmat = rtemp; |
break; | | break; |
| | |
case WRIGHT: | | case WRIGHT: |
vm_angvec_make(&rotvec,0,0,16384); | | tmpvec=vm_angvec_make(&rotvec,0,0,16384); |
vm_angles_2_matrix(&r1,&rotvec); | | vm_angles_2_matrix(&r1,&rotvec); |
vm_matrix_x_matrix(&rtemp,rotmat,&r1); | | vm_matrix_x_matrix(&rtemp,rotmat,&r1); |
*rotmat = rtemp; | | *rotmat = rtemp; |
break; | | break; |
| | |
case WBOTTOM: | | case WBOTTOM: |
vm_angvec_make(&rotvec,+16384,-32768,0); // bank was -32768, but I think that was an erroneous compensation | | tmpvec=vm_angvec_make(&rotvec,+16384,-32768,0); // bank was -32768, but I think that was an erroneous compensation |
vm_angles_2_matrix(&r1,&rotvec); | | vm_angles_2_matrix(&r1,&rotvec); |
vm_matrix_x_matrix(&rtemp,rotmat,&r1); | | vm_matrix_x_matrix(&rtemp,rotmat,&r1); |
*rotmat = rtemp; | | *rotmat = rtemp; |
break; | | break; |
| | |
case WFRONT: | | case WFRONT: |
vm_angvec_make(&rotvec,0,0,-32768); | | tmpvec=vm_angvec_make(&rotvec,0,0,-32768); |
vm_angles_2_matrix(&r1,&rotvec); | | vm_angles_2_matrix(&r1,&rotvec); |
vm_matrix_x_matrix(&rtemp,rotmat,&r1); | | vm_matrix_x_matrix(&rtemp,rotmat,&r1); |
*rotmat = rtemp; | | *rotmat = rtemp; |