Blender V2.61 - r43446
|
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_PROPERTYACTUATOR 00033 #define __KX_PROPERTYACTUATOR 00034 00035 #include "SCA_IActuator.h" 00036 00037 class SCA_PropertyActuator : public SCA_IActuator 00038 { 00039 Py_Header 00040 00041 enum KX_ACT_PROP_MODE { 00042 KX_ACT_PROP_NODEF = 0, 00043 KX_ACT_PROP_ASSIGN, 00044 KX_ACT_PROP_ADD, 00045 KX_ACT_PROP_COPY, 00046 KX_ACT_PROP_TOGGLE, 00047 KX_ACT_PROP_MAX 00048 }; 00049 00051 bool isValid(KX_ACT_PROP_MODE mode); 00052 00053 int m_type; 00054 STR_String m_propname; 00055 STR_String m_exprtxt; 00056 SCA_IObject* m_sourceObj; // for copy property actuator 00057 00058 public: 00059 00060 00061 00062 SCA_PropertyActuator( 00063 SCA_IObject* gameobj, 00064 SCA_IObject* sourceObj, 00065 const STR_String& propname, 00066 const STR_String& expr, 00067 int acttype); 00068 00069 00070 ~SCA_PropertyActuator(); 00071 00072 CValue* 00073 GetReplica( 00074 ); 00075 00076 virtual void ProcessReplica(); 00077 virtual bool UnlinkObject(SCA_IObject* clientobj); 00078 virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); 00079 00080 virtual bool 00081 Update(); 00082 00083 /* --------------------------------------------------------------------- */ 00084 /* Python interface ---------------------------------------------------- */ 00085 /* --------------------------------------------------------------------- */ 00086 00087 }; 00088 00089 #endif //__KX_PROPERTYACTUATOR_DOC 00090