00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef TEST_EVENTS__OBJECT_MANAGER_H
00026 #define TEST_EVENTS__OBJECT_MANAGER_H
00027
00028
00029
00030 namespace Teddy {
00031 namespace Materials { class Light; };
00032 namespace Models { class ModelInstance; };
00033 namespace Scenes { class Camera; };
00034 namespace Scenes { class Scene; };
00035 namespace SysSupport { class Clock; };
00036 };
00037 using namespace Teddy::Materials;
00038 using namespace Teddy::Models;
00039 using namespace Teddy::Scenes;
00040 using namespace Teddy::SysSupport;
00041
00042
00043 namespace Teddy {
00044 namespace SpaceGame {
00045
00046
00047 class CollisionGroup;
00048 class PlayerShip;
00049 class Root;
00050 class ShipCamera;
00051 class ShipType;
00052
00053
00058 class ObjectManager {
00059 public:
00060 ObjectManager( Root *root );
00061
00062 void updateObjects ();
00063 void addObjects ();
00064 void addLights ( int num =1, const bool animate=false );
00065 void addGrid ( int xcount, int zcount, int xspace, int zspace );
00066 void addPrimitives ();
00067 void loadLWO ();
00068 void addFFE ();
00069 void addROAM ();
00070 void addRigidBodies ();
00071
00072 void rayCollision ( ModelInstance *mi );
00073
00074 Camera *getCamera ();
00075 void setActiveCamera( Camera *c );
00076
00077 Scene *getScene ();
00078 PlayerShip *getPlayerShip ();
00079 ShipCamera *getShipCamera ();
00080
00081 void instanceRotate ( const int x, const int y );
00082 void instanceScale ( const int x, const int y );
00083 void instanceTranslateXZ ( const int x, const int y );
00084 void instanceTranslateYZ ( const int x, const int y );
00085 void selectInstance ( const int x, const int y );
00086
00087 protected:
00088 Root *root;
00089 Scene *scene;
00090 Camera *camera;
00091 Camera *camera2;
00092 Camera *active_camera;
00093 ShipCamera *player_camera;
00094 ModelInstance *instance;
00095 CollisionGroup *solar_bodies_cg;
00096 ShipType *ship_type;
00097 PlayerShip *player_ship;
00098 };
00099
00100
00101 };
00102 };
00103
00104
00105 #endif // TEST_EVENTS__OBJECT_MANAGER_H
00106