root/juggler/tags/1.0_alpha_04_01/vjConfig.h

Revision 496, 1.2 kB (checked in by allenb, 10 years ago)

Moved common includes to vjConfig.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #ifndef _VJ_CONFIG_H_
2 #define _VJ_CONFIG_H_
3 #pragma once
4
5 /*
6  * ----------------------------------------------------------------------------
7  * This file (vjConfig.h) includes header files common to most, if not all,
8  * files in the VR Juggler source tree.  It must be included at the top of
9  * every .h and .cpp file before any other headers because it includes system
10  * headers.
11  *
12  * $Id$
13  * ----------------------------------------------------------------------------
14  */
15
16 /* This should always be included first. */
17 #ifdef HAVE_CONFIG_H
18 #include <vjDefines.h>
19 #endif  /* HAVE_CONFIG_H */
20
21 /* Common includes */
22 /* Put here for pre-compiled headers */
23 #ifdef __cplusplus
24 #include <iostream.h>
25 #include <iomanip.h>
26 #include <fstream.h>
27 #endif
28
29 /* --- Macros ---- */
30 #define VJ_DEG2RAD(x) ((x)*M_PI/180.0)
31 #define VJ_RAD2DEG(x) ((x)*180.0/M_PI)
32 #define VJ_ZERO_CLAMP(x) ((fabs(x) < 1e-15)? 0.0f : x)
33 #define VJ_CLAMP(x,y) ((x>y)? y : x)
34 #define VJ_MIN2(x,y) ((x>y)? y : x)
35 #define VJ_MIN3(x,y,z) VJ_MIN2(VJ_MIN2(x,y),z)
36 #define VJ_MIN4(w,x,y,z) VJ_MIN2(VJ_MIN2(w,x), VJ_MIN2(y,z))
37 #define VJ_MAX2(x,y) ((x>y)? x : y)
38 #define VJ_MAX3(x,y,z) VJ_MAX2(VJ_MAX2(x,y),z)
39 #define VJ_MAX4(w,x,y,z) VJ_MAX2(VJ_MAX2(w,x),VJ_MAX2(y,z))
40
41 #endif  /* _VJ_CONFIG_H_ */
Note: See TracBrowser for help on using the browser.