Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

KX_Scene.h

Go to the documentation of this file.
00001 #ifndef __KX_SCENE_H
00002 #define __KX_SCENE_H
00003 
00004 #include "solid.h"
00005 
00006 #include "KX_Matrix4x4.h"
00007 
00008 #include <vector>
00009 
00010 struct SM_MaterialProps;
00011 struct SM_ShapeProps;
00012 #include "GEN_Map.h"
00013 #include "KX_HashedPtr.h"
00014 #include "SG_IObject.h"
00015 #include "SCA_IScene.h"
00016 
00017 
00018 class KX_Scene : public SCA_IScene
00019 {
00020         typedef std::vector<SM_MaterialProps *> T_MaterialList; 
00021         typedef std::vector<SM_ShapeProps *> T_ShapeList; 
00022         
00023         class CListValue*                       m_tempObjectList;
00024 
00025         class CListValue*                       m_objectlist;
00026         class CListValue*                       m_parentlist; // all 'root' parents
00027         class CListValue*                       m_lightlist;
00028         class CListValue*                       m_cameralist;
00029         
00030         class SCA_LogicManager*         m_logicmgr;
00031         class SCA_KeyboardManager*      m_keyboardmgr;
00032         class SCA_MouseManager*         m_mousemgr;
00033         class SCA_TimeEventManager*     m_timemgr;
00034         
00035         class SM_Scene*                         m_sumoScene;
00036         DT_SceneHandle                          m_solidScene;
00037         DT_RespTableHandle                      m_respTable;
00038 
00039         class OpenALScene*                      m_sndscene;
00040 
00041         class KX_Camera*                        m_pCamera;
00042         int                                                     m_activecam;
00043         CMatrix4x4                                      m_projectionmat;
00044         CMatrix4x4                                      m_viewmat;
00045 
00046         GEN_Map<CHashedPtr,class KX_GameObject*> m_logicGameObjectSearchMap;
00047         
00048         class SCA_ISystem*                      m_kxsystem;
00049         std::vector <class RAS_MeshObject*> m_meshlist;
00050         
00051         T_MaterialList              m_materialList;
00052         T_ShapeList                 m_shapeList;
00053         
00054         int                                                     m_ueberExecutionPriority;
00055 
00056 public:
00057         KX_Scene(class SCA_ISystem* system);
00058         virtual ~KX_Scene();
00059 
00060         // SCA_IScene INTERFACE
00061         SCA_IObject*    AddReplicaObject(class CValue* gameobj,class CValue* locationobj,int lifespan=0);
00062         void*                   AddNodeReplicaObject(class SG_IObject* node,class CValue* gameobj);
00063         void*                   RemoveNodeDestructObject(class SG_IObject* node,class CValue* gameobj);
00064 
00065 
00066         void            RemoveObject(class CValue* gameobj);
00067         void            NewRemoveObject(class CValue* gameobj);
00068         void            ReplaceMesh(class CValue* gameobj,void* meshobj);
00069                 
00070         
00071         
00072 
00073         // logic stuff
00074         void    LogicBeginFrame(double curtime,double deltatime);
00075         void    LogicUpdateFrame(double curtime,double deltatime);
00076         void    LogicEndFrame();
00077         
00078 
00079         CListValue*                             GetObjectList()         {       return m_objectlist;};
00080         CListValue*                             GetRootParentList()     {       return m_parentlist;}
00081         CListValue*                             GetLightList()          {       return m_lightlist;}
00082         CListValue*                             GetCameraList()         {       return m_cameralist;}
00083         SCA_LogicManager*               GetLogicManager()       {       return m_logicmgr;}
00084         SCA_TimeEventManager*   GetTimeEventManager() { return m_timemgr;}
00085 
00086         DT_SceneHandle          GetSolidScene() { return m_solidScene; }
00087 
00088         KX_Camera*                              GetActiveCamera();
00089         void                                    SetActiveCamera(class KX_Camera* cam);
00090         
00091         CMatrix4x4&                             GetViewMatrix();
00092         CMatrix4x4&                             GetProjectionMatrix();
00093         void                                    SetProjectionMatrix(CMatrix4x4& pmat)

00094         {
00095                 m_projectionmat = pmat;
00096         }
00097 
00098         void                                    SetSumoScene(SM_Scene* sumoscene) { m_sumoScene = sumoscene;}
00099         void                                    SetSoundScene(OpenALScene* sndscene) { m_sndscene = sndscene;}
00100 
00101         void AddMaterialProps(SM_MaterialProps *materialProps)

00102         {
00103                 m_materialList.push_back(materialProps);
00104         }
00105 
00106         void AddShapeProps(SM_ShapeProps *shapeProps)

00107         {
00108                 m_shapeList.push_back(shapeProps);
00109         }
00110 
00111 
00112         void                                    CalculateVisibleMeshes(class RAS_IRasterizer* rasty);
00113         KX_Camera*                              GetpCamera() { return m_pCamera;};
00114 
00115         SM_Scene*                               GetSumoScene()  { return m_sumoScene;}
00116         OpenALScene*                    GetSoundScene() { return m_sndscene;}
00117 
00118         void                                    ReplicateLogic(class KX_GameObject* newobj);
00119         static SG_Callbacks             m_callbacks;
00120 
00121 
00122 };
00123 
00124 
00125 /*
00126 
00127 void*   KX_SceneReplicationNewFunc(SG_IObject* node,void* gameobj,void* scene);

00128 void*   KX_SceneDestructionNewFunc(SG_IObject* node,void* gameobj,void* scene);

00129 
00130 */
00131 #endif //__KX_SCENE_H
00132 
00133 
00134 
00135 

Generated at Thu Feb 1 13:03:06 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000