/****************************************************************************** libx42.net - skinned vertex animation library (.NET API) Copyright (C) 2007 HermitWorks Entertainment Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA. ******************************************************************************/ #pragma once #include "Vector.h" #include "Quaternion.h" #include "ModelItemCollection.h" namespace Libx42 { ref class Model; ref class Influence; ref class Tag; ref class AnimationGroup; [System::Flags] public enum class BoneFlags : uint { None = X42_BF_NONE, UseInverseParentScale = X42_BF_USE_INV_PARENT_SCALE, }; public ref class Bone { public: property Model^ Owner { Model^ get( void ) { return owner; } } property int Index { int get( void ) { return index; } } [ComponentModel::EditorBrowsable( ComponentModel::EditorBrowsableState::Advanced )] property const x42bone_t& RawBone { const x42bone_t& get( void ); } property String^ Name { String^ get( void ); } property Bone^ Parent { Bone^ get( void ); } property ::Libx42::AnimationGroup^ AnimationGroup { ::Libx42::AnimationGroup^ get( void ) { return animGroup; } } property float Extent { float get( void ) { return RawBone.extent; } } property BoneFlags Flags { BoneFlags get( void ) { return (BoneFlags)RawBone.flags; } } array< Bone^ >^ GetChildren( void ); array< Influence^ >^ GetInfluences( void ); array< Tag^ >^ GetTags( void ); internal: Bone( Model ^owner, int index ); ::Libx42::AnimationGroup ^animGroup; private: Model ^owner; int index; }; public ref class BoneCollection : public ModelItemCollection< Bone^ > { public: array< Bone^ >^ GetRootBones( void ); internal: BoneCollection( Model ^owner ); BoneCollection( AnimationGroup ^animGroup ); }; };