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

Revision 1084, 2.0 kB (checked in by patrick, 9 years ago)

Added my name to the copyright notice.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  *  File:           $RCSfile$
3  *  Date modified:  $Date$
4  *  Version:        $Revision$
5  *
6  *
7  *                                VR Juggler
8  *                                    by
9  *                              Allen Bierbaum
10  *                             Christopher Just
11  *                             Patrick Hartling
12  *                            Carolina Cruz-Neira
13  *                               Albert Baker
14  *
15  *                         Copyright  - 1997,1998,1999
16  *                Iowa State University Research Foundation, Inc.
17  *                            All Rights Reserved
18  */
19
20
21 #ifndef _VJ_CONFIG_H_
22 #define _VJ_CONFIG_H_
23 #pragma once
24
25 /*
26  * ----------------------------------------------------------------------------
27  * This file (vjConfig.h) includes header files common to most, if not all,
28  * files in the VR Juggler source tree.  It must be included at the top of
29  * every .h and .cpp file before any other headers because it includes system
30  * headers.
31  * ----------------------------------------------------------------------------
32  */
33
34 /* This should always be included first. */
35 #ifdef HAVE_CONFIG_H
36 #include <vjDefines.h>
37 #endif  /* HAVE_CONFIG_H */
38
39 #ifdef _DEBUG
40 #   define VJ_DEBUG
41 #else
42 #   define VJ_OPT
43 #endif
44
45 /* Common includes */
46 /* Put here for pre-compiled headers */
47 #ifdef __cplusplus
48 #include <iostream.h>
49 #include <iomanip.h>
50 #include <fstream.h>
51 #include <vector>
52 #include <map>
53 #include <string>
54 #include <algorithm>
55 //#include <Kernel/vjDebug.h>
56 #endif
57
58
59 /* --- Macros ---- */
60 #define VJ_EPS 1e-8
61 #define VJ_DEG2RAD(x) ((x)*M_PI/180.0)
62 #define VJ_RAD2DEG(x) ((x)*180.0/M_PI)
63 #define VJ_ZERO_CLAMP(x) ((fabs(x) < VJ_EPS)? 0.0f : x)
64 #define VJ_IS_ZERO(x) (fabs(x) < VJ_EPS)
65 #define VJ_CLAMP(x,y) ((x>y)? y : x)
66 #define VJ_MIN2(x,y) ((x>y)? y : x)
67 #define VJ_MIN3(x,y,z) VJ_MIN2(VJ_MIN2(x,y),z)
68 #define VJ_MIN4(w,x,y,z) VJ_MIN2(VJ_MIN2(w,x), VJ_MIN2(y,z))
69 #define VJ_MAX2(x,y) ((x>y)? x : y)
70 #define VJ_MAX3(x,y,z) VJ_MAX2(VJ_MAX2(x,y),z)
71 #define VJ_MAX4(w,x,y,z) VJ_MAX2(VJ_MAX2(w,x),VJ_MAX2(y,z))
72
73
74 #endif  /* _VJ_CONFIG_H_ */
Note: See TracBrowser for help on using the browser.