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

KX_SceneActuator.h

Go to the documentation of this file.
00001  
00002 //
00003 // Add object to the game world on action of this actuator
00004 //
00005 // Version: $Id: KX_SceneActuator_h-source.html,v 1.2 2001/02/01 12:25:07 coockie Exp $
00006 //
00007 
00008 #ifndef __KX_SCENEACTUATOR
00009 #define __KX_SCENEACTUATOR
00010 
00011 #include "SCA_IActuator.h"
00012 
00013 class KX_SceneActuator : public SCA_IActuator
00014 {
00015         Py_Header;
00016         
00017         int m_mode;
00018         // (restart) has become a toggle internally... not in the interface
00019         // though
00020         bool m_restart;
00021         
00022         // (set Scene) Scene
00023         class   KX_Scene*       m_scene;
00024         // (Set Camera) Object
00025         class   KX_Camera*      m_camera;
00026 
00027         /* find a scene or camera... */
00028         void *findScene(char* sceneName);
00029         void *findCamera(char* cameraName);
00030         
00031  public:
00032         enum SCA_SceneActuatorMode {
00033                 KX_SCENE_NODEF = 0,
00034                 KX_SCENE_RESTART,
00035                 KX_SCENE_SET_SCENE,
00036                 KX_SCENE_SET_CAMERA,
00037                 KX_SCENE_MAX
00038         };
00039         
00040         KX_SceneActuator(SCA_IObject* gameobj,
00041                                          int mode,
00042                                          KX_Scene* scene,
00043                                          KX_Camera* camera,
00044                                          PyTypeObject* T=&Type);
00045         virtual ~KX_SceneActuator();
00046         virtual CValue* GetReplica() {
00047                 KX_SceneActuator* replica = new KX_SceneActuator(*this);
00048                 replica->ProcessReplica();
00049                 // this will copy properties and so on...
00050                 CValue::AddDataToReplica(replica);
00051                 return replica;
00052         };
00053 
00054         virtual bool Update(double curtime,double deltatime);
00055         
00056         /* --------------------------------------------------------------------- */
00057         /* Python interface ---------------------------------------------------- */
00058         /* --------------------------------------------------------------------- */
00059 
00060         virtual PyObject*  _getattr(char *attr);
00061 
00062         /* 1. set                                                                */
00063         /* Removed */
00064           
00065         /* 2. setUseRestart:                                                     */
00066         KX_PYMETHOD_DOC(KX_SceneActuator,SetUseRestart);
00067         /* 3. getUseRestart:                                                     */
00068         KX_PYMETHOD_DOC(KX_SceneActuator,GetUseRestart);
00069         /* 4. setScene:                                                          */
00070         KX_PYMETHOD_DOC(KX_SceneActuator,SetScene);
00071         /* 5. getScene:                                                          */
00072         KX_PYMETHOD_DOC(KX_SceneActuator,GetScene);
00073         /* 6. setCamera:                                                          */
00074         KX_PYMETHOD_DOC(KX_SceneActuator,SetCamera);
00075         /* 7. getCamera:                                                          */
00076         KX_PYMETHOD_DOC(KX_SceneActuator,GetCamera);
00077         
00078 }; /* end of class KXSceneActuator */
00079 
00080 #endif

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