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

SCA_AddObjectActuator.h

Go to the documentation of this file.
00001 //
00002 // Add object to the game world on action of this actuator. A copy is made
00003 // of a referenced object. The copy inherits some properties from the owner
00004 // of this actuator.
00005 //
00006 // Version: $Id: SCA_AddObjectActuator_h-source.html,v 1.1 2001/02/01 12:25:11 coockie Exp $
00007 //
00008 
00009 #ifndef __SCA_AddObjectActuator
00010 #define __SCA_AddObjectActuator
00011 
00012 /* Actuator tree */
00013 #include "SCA_IActuator.h"
00014 #include "SCA_LogicManager.h"
00015 
00016 #include "MT_Vector3.h"
00017 
00018 class SCA_AddObjectActuator : public SCA_IActuator
00019 {
00020         Py_Header;
00021         // time field: lifetime of the new object
00022         int                                             m_timeProp;
00023         // original object reference (object to replicate)
00024         
00025         CValue*                                         m_OriginalObject;
00026         // object will be added to the following scene
00027         class SCA_IScene*                       m_scene;
00029         MT_Vector3  m_linear_velocity;
00031         bool m_localFlag;
00032         
00033 public:
00034         SCA_AddObjectActuator(SCA_IObject *gameobj,
00035                                                  CValue* original,
00036                                                  int time,
00037                                                  class SCA_IScene* scene,
00038                                                  const MT_Vector3& linvel,
00039                                                  bool local,
00040                                                  PyTypeObject* T=&Type);
00041         ~SCA_AddObjectActuator(void);
00042         virtual CValue* GetReplica() {
00043                 SCA_AddObjectActuator* replica = new SCA_AddObjectActuator(*this);
00044                 // this will copy properties and so on...
00045                 replica->ProcessReplica();
00046                 CValue::AddDataToReplica(replica);
00047                 return replica;
00048         };
00049 
00050         bool Update(double curtime,double deltatime);
00051         virtual PyObject*  _getattr(char *attr);
00052 
00053 
00054         /* 1. setObject */
00055         KX_PYMETHOD_DOC(SCA_AddObjectActuator,SetObject);
00056         /* 2. setTime */
00057         KX_PYMETHOD_DOC(SCA_AddObjectActuator,SetTime);
00058         /* 3. getTime */
00059         KX_PYMETHOD_DOC(SCA_AddObjectActuator,GetTime);
00060         /* 4. getObject */
00061         KX_PYMETHOD_DOC(SCA_AddObjectActuator,GetObject);
00062         /* 5. getLinearVelocity */
00063         KX_PYMETHOD_DOC(SCA_AddObjectActuator,GetLinearVelocity);
00064         /* 6. setLinearVelocity */
00065         KX_PYMETHOD_DOC(SCA_AddObjectActuator,SetLinearVelocity);
00066         
00067 }; /* end of class SCA_AddObjectActuator : public KX_EditObjectActuator */
00068 
00069 #endif
00070 
00071 
00072 
00073 
00074 

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