|
Blender
V2.59
|
00001 // $Id: KX_SCA_DynamicActuator.h 35063 2011-02-22 10:33:14Z jesterking $ 00002 // 00003 // ***** BEGIN GPL LICENSE BLOCK ***** 00004 // 00005 // This program is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU General Public License 00007 // as published by the Free Software Foundation; either version 2 00008 // of the License, or (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; if not, write to the Free Software Foundation, 00017 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 // 00019 // The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00020 // All rights reserved. 00021 // 00022 // The Original Code is: all of this file. 00023 // 00024 // Contributor(s): Campbell Barton 00025 // 00026 // ***** END GPL LICENSE BLOCK ***** 00027 // 00028 00034 #ifndef __KX_SCA_DYNAMICACTUATOR 00035 #define __KX_SCA_DYNAMICACTUATOR 00036 00037 #include "SCA_IActuator.h" 00038 #include "SCA_PropertyActuator.h" 00039 #include "SCA_LogicManager.h" 00040 00041 #include "KX_GameObject.h" 00042 #include "KX_IPhysicsController.h" 00043 00044 class KX_SCA_DynamicActuator : public SCA_IActuator 00045 { 00046 Py_Header; 00047 00048 // dynamics operation to apply to the game object 00049 short m_dyn_operation; 00050 float m_setmass; 00051 public: 00052 KX_SCA_DynamicActuator( 00053 SCA_IObject* gameobj, 00054 short dyn_operation, 00055 float setmass 00056 ); 00057 00058 ~KX_SCA_DynamicActuator( 00059 ); 00060 00061 CValue* 00062 GetReplica( 00063 ); 00064 00065 virtual bool 00066 Update(); 00067 00068 //Python Interface 00069 enum DynamicOperation { 00070 KX_DYN_RESTORE_DYNAMICS = 0, 00071 KX_DYN_DISABLE_DYNAMICS, 00072 KX_DYN_ENABLE_RIGID_BODY, 00073 KX_DYN_DISABLE_RIGID_BODY, 00074 KX_DYN_SET_MASS, 00075 }; 00076 }; 00077 00078 #endif