SO3Engine
SO3Std.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
32#ifndef __SO3STD_H__
33#define __SO3STD_H__
34
35// Detect platform & compilator
36#include "SO3Utils/SO3Point.h"
37#include <string>
38
39// using strings without "std::"
40using std::string;
41
42#ifndef ASSERT
43# define ASSERT assert
44#endif
45
46#define DELETEARRAY(x) if(x) {delete []x; x = NULL;}
47#define CHECKALLOC(x) if(!x) {return false;}
48#define EXPAND(x) x, sizeof(x)/sizeof(TCHAR)
49#define AROUNDINT(x) ((((x)-floor(x)) < (ceil(x)-(x))) ? ((int)floor(x)) : ((int)ceil(x)))
50
51// Rotation Matrix Type
52# define SO3_MATRIX_XYZ 0
53# define SO3_MATRIX_XZY 1
54# define SO3_MATRIX_YXZ 2
55# define SO3_MATRIX_YZX 3
56# define SO3_MATRIX_ZXY 4
57# define SO3_MATRIX_ZYX 5
58
59// Physic Solver Mode Type
60# define SO3_SM_EXACT 0
61# define SO3_SM_ADAPTATIVE 1
62
63// Physic Friction Mode Type
64# define SO3_FM_EXACT 0
65# define SO3_FM_ADAPTATIVE 1
66
67// Physic Platform Mode Type
68# define SO3_PA_DEFAULT 0
69# define SO3_PA_MEDIUM 1
70# define SO3_PA_BEST 2
71
72// Fog mode
73# define SO3_FOG_NONE 0
74# define SO3_FOG_EXP 1
75# define SO3_FOG_EXP2 2
76# define SO3_FOG_LINEAR 3
77
78// Booleen Type
79# define SO3_FALSE 0
80# define SO3_TRUE 1
81
82// Billboard Particle Type
83# define SO3_PARTICLE_BB_POINT (1)
84# define SO3_PARTICLE_BB_SELFORIENTED (1<<2)
85# define SO3_PARTICLE_BB_COMMONORIENTED (1<<3)
86
87// Emitter Type
88# define SO3_EMITTER_BOX (1)
89# define SO3_EMITTER_CYLINDER (1<<2)
90# define SO3_EMITTER_ELLIPSOID (1<<3)
91# define SO3_EMITTER_HOLLOWELLIPSOID (1<<4)
92# define SO3_EMITTER_POINT (1<<5)
93# define SO3_EMITTER_RING (1<<6)
94
95// Object Flag
96#define SO3_OBJECT_MOUSE_ENABLE (1)
97#define SO3_OBJECT_MOUSE_FOREGROUND (1<<2)
98
99// Polygon Mode
100#define SO3_POLY_POINTS (1)
101#define SO3_POLY_SOLID (1<<2)
102#define SO3_POLY_WIREFRAME (1<<3)
103
104// Camera Projection Type
105#define SO3_PROJECTION_PERSPECTIVE (1)
106#define SO3_PROJECTION_ORTHOGRAPHIC (1<<2)
107
108// CallBack Physic Material Type
109#define SO3_MATERIALPAIR_COLLISION 0
110#define SO3_MATERIALPAIR_OVERLAP_STARTED 1
111#define SO3_MATERIALPAIR_OVERLAP_ENDED 2
112#define SO3_MATERIALPAIR_BUOYANCY_COLLISION 3
113
114// CallBack Body Type
115#define SO3_BODY_LEAVE_WORLD 0
116
117// Widget event indexes declaration
118#define SO3_WIDGET_SCRIPT_EVENT 0
119#define SO3_WIDGET_IS_INSIDE_EVENT 1
120#define SO3_WIDGET_ENTER_EVENT 2
121#define SO3_WIDGET_EXIT_EVENT 3
122#define SO3_WIDGET_MOUSE_DOWN_EVENT 4
123#define SO3_WIDGET_MOUSE_UP_EVENT 5
124#define SO3_WIDGET_MOUSEWHEEL_EVENT 6
125#define SO3_WIDGET_MOUSE_MOVE_EVENT 7
126#define SO3_WIDGET_KEY_DOWN_EVENT 8
127#define SO3_WIDGET_KEY_UP_EVENT 9
128#define SO3_WIDGET_KEY_EVENT 10
129#define SO3_WIDGET_FOCUS_EVENT 11
130#define SO3_WIDGET_ON_LOAD_START_EVENT 12
131#define SO3_WIDGET_ON_LOAD_END_EVENT 13
132#define SO3_WIDGET_ON_LOAD_ERROR_EVENT 14
133#define SO3_WIDGET_TOUCH_ADD_EVENT 15
134#define SO3_WIDGET_TOUCH_REMOVE_EVENT 16
135#define SO3_WIDGET_TOUCH_UPDATE_EVENT 17
136#define SO3_WIDGET_INPUT_DOWN_EVENT 18
137#define SO3_WIDGET_INPUT_UP_EVENT 19
138#define SO3_WIDGET_INPUT_UPDATE_EVENT 20
139#define SO3_WIDGET_INPUT_WHEEL_EVENT 21
140
141// Anim type
142#define SO3_ANIM_END 0
143
144// Scene type
145#define SO3_SCENE_PRE_RENDER_EVENT 0
146#define SO3_SCENE_PRE_RENDER_EVENT2 1
147#define SO3_SCENE_POST_RENDER_EVENT 2
148#define SO3_SCENE_PRE_RENDER_PHYSIC_EVENT 3
149
150//Object type
151#define SO3_OBJECT_LOADED_EVENT 0
152
153// Buffer type
154#define SO3_BUFFER_PRE_RENDER_EVENT 0
155#define SO3_BUFFER_POST_RENDER_EVENT 1
156#define SO3_BUFFER_STEREO_BEFORE_UPDATE_EVENT 2
157#define SO3_BUFFER_STEREO_UPDATE_PARAMS_EVENT 3
158#define SO3_BUFFER_STEREO_UPDATED_EVENT 4
159
160// Log Type
161#define SO3_LL_LOW 4
162#define SO3_LL_NORMAL 2
163#define SO3_LL_BOREME 1
164
165#define SO3_LOGS_CB 0
166
167// Multi sampling OpenGL Type
168#define WGL_SAMPLE_BUFFERS_ARB 0x2041
169#define WGL_SAMPLES_ARB 0x2042
170
171/*#ifdef _DEBUG
172# define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
173# define new DEBUG_NEW
174#endif*/
175
176#endif