Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation/src/orxonox/OrxonoxPrereqs.h @ 2466

Last change on this file since 2466 was 2466, checked in by rgrieder, 15 years ago

Added callback for collisions. Every WorldEntity that collides against another will be called with the following function:
virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
btManifoldPoint is from Bullet and tells you more about the contact point, like position.

Per default, the callback is disabled. Enable it with this→enableCollisionCallback(), for instance in your derived class constructor.
Note that if you activate the callback for e.g. SpaceShips, but not for MovableEntities, then collidesAgainst will only be called in the SpaceShip. This could be changed however, just ask me.

  • Property svn:eol-style set to native
File size: 5.2 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30  @file
31  @brief Contains all the necessary forward declarations for all classes and structs.
32*/
33
34#ifndef _OrxonoxPrereqs_H__
35#define _OrxonoxPrereqs_H__
36
37#include "util/OrxonoxPlatform.h"
38
39//-----------------------------------------------------------------------
40// Shared library settings
41//-----------------------------------------------------------------------
42#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
43#  ifdef ORXONOX_SHARED_BUILD
44#    define _OrxonoxExport __declspec(dllexport)
45#  else
46#    if defined( __MINGW32__ )
47#      define _OrxonoxExport
48#    else
49#      define _OrxonoxExport __declspec(dllimport)
50#    endif
51#  endif
52#elif defined ( ORXONOX_GCC_VISIBILITY )
53#  define _OrxonoxExport  __attribute__ ((visibility("default")))
54#else
55#  define _OrxonoxExport
56#endif
57
58//-----------------------------------------------------------------------
59// Forward declarations
60//-----------------------------------------------------------------------
61
62namespace orxonox
63{
64    namespace LODParticle
65    {
66        enum LOD
67        {
68            off = 0,
69            low = 1,
70            normal = 2,
71            high = 3
72        };
73    }
74
75    class GraphicsEngine;
76    class Settings;
77
78    class RadarViewable;
79    class Radar;
80    class RadarListener;
81
82    class CameraManager;
83    class LevelManager;
84    class PlayerManager;
85
86    // objects
87    class Level;
88    class Scene;
89
90    class AddQuest;
91    class AddQuestHint;
92    class AddReward;
93    class ChangeQuestStatus;
94    class CompleteQuest;
95    class FailQuest;
96    class GlobalQuest;
97    class LocalQuest;
98    class Quest;
99    class QuestDescription;
100    class QuestEffect;
101    class QuestEffectBeacon;
102    class QuestHint;
103    class QuestItem;
104    class QuestListener;
105    class QuestManager;
106    class Rewardable;
107
108    class WorldEntity;
109    class StaticEntity;
110    class MobileEntity;
111    class ControllableEntity;
112    class MovableEntity;
113    class Sublevel;
114
115    class Model;
116    class Billboard;
117    class BlinkingBillboard;
118    class Light;
119    class Backlight;
120    class ParticleEmitter;
121    class ParticleSpawner;
122
123    class Camera;
124    class CameraPosition;
125    class SpawnPoint;
126
127    class Spectator;
128    class Pawn;
129    class SpaceShip;
130
131    class Trigger;
132    class DistanceTrigger;
133    class EventTrigger;
134    class PlayerTrigger;
135
136    class WeaponSystem;
137    class WeaponSet;
138    class WeaponSlot;
139    class Weapon;
140    class Munition;
141
142    class EventListener;
143    class EventDispatcher;
144    class EventTarget;
145
146    class Controller;
147    class HumanController;
148
149    class Info;
150    class PlayerInfo;
151    class HumanPlayer;
152
153    class Gametype;
154
155    class Scores;
156
157    // collision
158    class CollisionShape;
159    class SphereCollisionShape;
160    class CompoundCollisionShape;
161    class PlaneCollisionShape;
162
163    // tools
164    class BillboardSet;
165    class Light;
166    class Mesh;
167    class ParticleInterface;
168    template <class T>
169    class Timer;
170
171    // overlays
172    class BarColour;
173    class DebugFPSText;
174    class DebugRTRText;
175    class HUDBar;
176    class HUDNavigation;
177    class HUDRadar;
178    class HUDSpeedBar;
179    class InGameConsole;
180    class Notification;
181    class NotificationManager;
182    class NotificationQueue;
183    class OrxonoxOverlay;
184    class OverlayGroup;
185    class OverlayText;
186
187    //gui
188    class GUIManager;
189
190    // game states
191    class GSRoot;
192    class GSGraphics;
193    class GSIO;
194    class GSIOConsole;
195    class GSLevel;
196    class GSStandalone;
197    class GSServer;
198    class GSClient;
199    class GSGUI;
200}
201
202namespace Ogre
203{
204    // some got forgotten in OgrePrerequisites
205    class BorderPanelOverlayElement;
206    class PanelOverlayElement;
207    class TextAreaOverlayElement;
208}
209
210namespace CEGUI
211{
212    class LuaScriptModule;
213
214    class OgreCEGUIRenderer;
215    class OgreCEGUIResourceProvider;
216    class OgreCEGUITexture;
217}
218
219// Bullet Physics Engine
220
221class btTransform;
222class btVector3;
223
224class btRigidBody;
225class btCollisionObject;
226class btGhostObject;
227class btManifoldPoint;
228
229class btCollisionShape;
230class btSphereShape;
231class btCompoundShape;
232class btStaticPlaneShape;
233
234class btDiscreteDynamicsWorld;
235class bt32BitAxisSweep3;
236class btDefaultCollisionConfiguration;
237class btCollisionDispatcher;
238class btSequentialImpulseConstraintSolver;
239
240// lua
241struct lua_State;
242
243#endif /* _OrxonoxPrereqs_H__ */
Note: See TracBrowser for help on using the repository browser.