|
Blender
V2.59
|
00001 /* 00002 * $Id: KX_SG_BoneParentNodeRelationship.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 */ 00030 00035 #ifndef __KX_SG_BONEPARENTRELATION_H__ 00036 #define __KX_SG_BONEPARENTRELATION_H__ 00037 00038 #include "SG_Spatial.h" 00039 #include "SG_ParentRelation.h" 00040 00041 struct Bone; 00042 00047 class KX_BoneParentRelation : public SG_ParentRelation 00048 { 00049 00050 public : 00059 static 00060 KX_BoneParentRelation * 00061 New(Bone* bone 00062 ); 00063 00070 bool 00071 UpdateChildCoordinates( 00072 SG_Spatial * child, 00073 const SG_Spatial * parent, 00074 bool& parentUpdated 00075 ); 00076 00080 SG_ParentRelation * 00081 NewCopy( 00082 ); 00083 00084 ~KX_BoneParentRelation( 00085 ); 00086 00087 private : 00088 Bone* m_bone; 00089 KX_BoneParentRelation(Bone* bone 00090 ); 00091 00092 00093 #ifdef WITH_CXX_GUARDEDALLOC 00094 public: 00095 void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BoneParentRelation"); } 00096 void operator delete( void *mem ) { MEM_freeN(mem); } 00097 #endif 00098 }; 00099 00100 #endif