-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvm_conf.h
140 lines (116 loc) · 3.27 KB
/
vm_conf.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
Copyright (C) 1997,1998,1999
Kenji Hiranabe, Eiwa System Management, Inc.
This program is free software.
Implemented by Kenji Hiranabe(hiranabe@esm.co.jp),
conforming to the Java(TM) 3D API specification by Sun Microsystems.
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation. Kenji Hiranabe and Eiwa System Management,Inc.
makes no representations about the suitability of this software for any
purpose. It is provided "AS IS" with NO WARRANTY.
*/
#ifndef VM_CONF_H
#define VM_CONF_H
/* -----------------------------------------------------------
* you can configure these defines.
* ----------------------------------------------------------- */
/*
* can do 'cout << vec;'
*/
#define VM_INCLUDE_IO
/*
* can do 'vec.toString();'
* automatically defines VM_INCLUDE_IO
*/
#define VM_INCLUDE_TOSTRING
/*
* places this library in 'kh_vecmath' namespace
* later section can turn this off(earlyer version than egcs1.1.2 ).
*
*/
#define VM_INCLUDE_NAMESPACE
/*
* can do 'double a[3][3]; mat.set(a);'
* don't define this in gcc 2.7.2.(template bug).
*/
// #define VM_INCLUDE_CONVERSION_FROM_2DARRAY
/*
* can do 'mat(i,j); v[i];'
* defining this can be a performance problem.
*/
// #define VM_INCLUDE_SUBSCRIPTION_OPERATOR
/*
* use cmath, cstddef, .... cXXXX type header
* otherwise use traditional math, stddef ..
*/
#define VM_STD_C_HEADERS
/*
* uses std:: namespace for sqrt, atan2, ...
* depends on whether system include files exports these raw names
*/
//#define VM_USE_STD_NAMESPACE
/*
* uses exception mechanizm (not supported now)
*/
//#define VM_USE_EXCEPTION
/*
* uses old non STL version of iostream library (currently only used for MSVC)
*/
//#define VM_USE_OLDIOSTREAM
/* -----------------------------------------------------------
* end user customization section
* ----------------------------------------------------------- */
// gcc earlier than egcs1.1.2, doesn't support namespace
#if !(2 <= __GNUC__ && 91 <= __GNUC_MINOR__)
#undef VM_INCLUDE_NAMESPACE
#undef VM_USE_STD_NAMESPACE
#endif
#ifdef _MSC_VER
# ifndef VM_USE_STD_NAMESPACE
# define VM_USE_STD_NAMESPACE
# endif
#elif defined(__cplusplus)
# ifndef VM_USE_STD_NAMESPACE
# define VM_USE_STD_NAMESPACE
# endif
#endif
#ifdef VM_INCLUDE_NAMESPACE
# define VM_VECMATH_NS kh_vecmath
# define VM_BEGIN_NS namespace kh_vecmath {
# define VM_END_NS }
#else
# define VM_VECMATH_NS
# define VM_BEGIN_NS
# define VM_END_NS
#endif
#ifdef VM_INCLUDE_TOSTRING
# ifndef VM_INCLUDE_IO
# define VM_INCLUDE_IO
# endif
#endif
#ifdef VM_USE_STD_NAMESPACE
# define VM_STD std
#else
# define VM_STD
#endif
#ifdef _MSC_VER
# define VM_MATH_STD
# define VM_STRING_STD VM_STD
# ifdef VM_USE_OLDIOSTREAM
# define VM_IOSTREAM_STD
# else
# define VM_IOSTREAM_STD VM_STD
# endif
#elif defined(__cplusplus)
# define VM_MATH_STD VM_STD
# define VM_STRING_STD VM_STD
# define VM_IOSTREAM_STD VM_STD
#else
# define VM_MATH_STD VM_STD
# define VM_STRING_STD VM_STD
# define VM_IOSTREAM_STD
#endif
#endif /* VM_CONF_H */