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.hpp File Reference

#include <j2k/Fred/Model.hpp>

Go to the source code of this file.

Defines

#define M_PI   3.14159265358979323846
#define DegreeToRad(val)   (val)*(M_PI/180)
#define X_AXIS   0
#define Y_AXIS   1
#define Z_AXIS   2

Functions

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


Define Documentation

#define DegreeToRad val       (val)*(M_PI/180)
 

Definition at line 7 of file Transfor.hpp.

#define M_PI   3.14159265358979323846
 

Definition at line 6 of file Transfor.hpp.

#define X_AXIS   0
 

Definition at line 9 of file Transfor.hpp.

#define Y_AXIS   1
 

Definition at line 10 of file Transfor.hpp.

#define Z_AXIS   2
 

Definition at line 11 of file Transfor.hpp.


Function Documentation

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

Definition at line 4 of file Transfor.cpp.

Referenced by RotProfToProfAxisCAO::GenerateVertex(), and ModeleurRotationZ().

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.

Referenced by RotProfToProfAxisCAO::GenerateVertex(), ModeleurProfToProf(), and ModeleurTranslation().

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