Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/3D/Transfor.cpp File Reference

#include <j2k/Fred/3D/Transfor.hpp>

Go to the source code of this file.

Functions

void RotateVertex (Sommet3D *som, double cosangle, double sinangle, char axis)
void TransVertex (Sommet3D *som, realtype x, realtype y, realtype z)


Function Documentation

void RotateVertex Sommet3D   som,
double    cosangle,
double    sinangle,
char    axis
 

Definition at line 4 of file Transfor.cpp.

00008 {
00009   double tmp;
00010 
00011   switch ( axis ) {
00012     case X_AXIS: 
00013        tmp = som->y;
00014        som->y =  tmp * cosangle - som->z * sinangle;
00015        som->z =  tmp * sinangle + som->z * cosangle;
00016        break;
00017 
00018     case Y_AXIS:
00019        tmp = som->x;
00020        som->x =  tmp * cosangle + som->z * sinangle;
00021        som->z = -tmp * sinangle + som->z * cosangle;
00022        break;
00023 
00024     case Z_AXIS:
00025        tmp = som->x;
00026        som->x =  tmp * cosangle - som->y * sinangle;
00027        som->y =  tmp * sinangle + som->y * cosangle;
00028        break;
00029 
00030     default:
00031        break;
00032   }
00033 }

void TransVertex Sommet3D   som,
realtype    x,
realtype    y,
realtype    z
 

Definition at line 35 of file Transfor.cpp.

00036 {
00037   som->x += x;
00038   som->y += y;
00039   som->z += z;
00040 }


Generated on Sun Oct 14 18:46:48 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001