Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Zmacro.h

Go to the documentation of this file.
00001 /*
00002 
00003         ZMACHINE 2.0 (SIGFRID)
00004 
00005         ZMACRO.H
00006 
00007         author:                 Trombetta Roberto
00008         filename:               Zmacro.h        
00009         description:    header file for macros 
00010         date:                   10/02/2003
00011 
00012 */
00013 
00014 #include "Zdef.h"
00015 #include <math.h>
00016 #include <stdio.h>
00017 
00018 #ifndef __ZMACRO_H_
00019 #define __ZMACRO_H_
00020 
00021 // FUNCTION SECTION
00022 
00024 #define ZM_FLOAT_EQ(x,v)        (((v - ZD_EPSILON) <x) && (x < (v + ZD_EPSILON)))
00025 
00026 #define ZM_SQRT(x)                      (zfloat) sqrt(x)
00027 
00028 #define ZM_FABS(x)                      fabs(x)
00029 
00030 // DEBUG SECTION
00031 
00033 #if (ZM_DEBUG_LEVEL == 1)
00034         #define ZM_CVECTOR3_OUT(x)      printf("x:%1.2f, y:%1.2f, z:%1.2f\n", x.fCoord[0], x.fCoord[1], x.fCoord[2])
00035 #elif (ZM_DEBUG_LEVEL == 0)
00036         #define ZM_CVECTOR3_OUT(x)      ;
00037 #else
00038         #error "ZM_ERROR: no legal debug level set."
00039 #endif
00040 
00042 #if (ZM_DEBUG_LEVEL == 1)
00043         #define ZM_CVECTORTEX3_OUT(x)   printf("x:%1.2f, y:%1.2f, z:%1.2f, u:%1.2f, v:%1.2f\n", x.fCoord[0], x.fCoord[1], x.fCoord[2], x.fTexcoord[0], x.fTexcoord[1])
00044 #elif  (ZM_DEBUG_LEVEL == 0)
00045         #define ZM_CVECTORTEX3_OUT(x)   ;
00046 #else
00047         #error "ZM_ERROR: no legal debug level set."
00048 #endif
00049 
00051 #if (ZM_DEBUG_LEVEL == 1)
00052         #define ZM_FLOAT_OUT(x) printf("%1.2f\n", x)
00053 #elif  (ZM_DEBUG_LEVEL == 0)
00054         #define ZM_FLOAT_OUT(x) ;
00055 #else
00056         #error "ZM_ERROR: no legal debug level set."
00057 #endif
00058 
00059 #endif



SourceForge.net Logo