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