Blender V2.61 - r43446

SCA_IScene.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00032 #ifndef __KX_ISCENE_H
00033 #define __KX_ISCENE_H
00034 
00035 #include <vector>
00036 
00037 #include "STR_String.h"
00038 #include "RAS_2DFilterManager.h"
00039 
00040 #ifdef WITH_CXX_GUARDEDALLOC
00041 #include "MEM_guardedalloc.h"
00042 #endif
00043 
00044 struct SCA_DebugProp
00045 {
00046     class CValue*   m_obj;
00047     STR_String      m_name;
00048     SCA_DebugProp();
00049     ~SCA_DebugProp();
00050 };
00051 
00052 class SCA_IScene 
00053 {
00054     std::vector<SCA_DebugProp*> m_debugList;
00055 public:
00056     SCA_IScene();
00057     virtual ~SCA_IScene();
00058     virtual class SCA_IObject* AddReplicaObject(class CValue* gameobj,
00059                                                 class CValue* locationobj,
00060                                                 int lifespan=0)=0;
00061     virtual void    RemoveObject(class CValue* gameobj)=0;
00062     virtual void    DelayedRemoveObject(class CValue* gameobj)=0;
00063     //virtual void  DelayedReleaseObject(class CValue* gameobj)=0;
00064     
00065     virtual void    ReplaceMesh(class CValue* gameobj,
00066                                 void* meshobj, bool use_gfx, bool use_phys)=0;
00067     std::vector<SCA_DebugProp*>& GetDebugProperties();
00068     void            AddDebugProperty(class CValue* debugprop,
00069                                      const STR_String &name);
00070     void            RemoveAllDebugProperties();
00071     virtual void    Update2DFilter(vector<STR_String>& propNames, void* gameObj, 
00072                                     RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, 
00073                                     int pass, STR_String& text) {}
00074 
00075 
00076 #ifdef WITH_CXX_GUARDEDALLOC
00077 public:
00078     void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_IScene"); }
00079     void operator delete( void *mem ) { MEM_freeN(mem); }
00080 #endif
00081 };
00082 
00083 #endif //__KX_ISCENE_H
00084