/****************************************************************************** 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 "Enums.h" #include "ModelItemCollection.h" namespace Libx42 { ref class Model; ref class Bone; ref class Influence; ref class InfluenceCollection; ref class IndexCollection; ref class VertexData; public ref class Group { public: property Model^ Owner { Model^ get( void ) { return owner; } } [ComponentModel::EditorBrowsable( ComponentModel::EditorBrowsableState::Advanced )] property const x42group_t& RawGroup { const x42group_t& get( void ); } property int Index { int get( void ) { return index; } } property String^ MaterialName { String^ get( void ); } property String^ SurfaceName { String^ get( void ); } property int MaxInfluencesPerVert { int get( void ) { return (int)(RawGroup.maxVertInfluences ? RawGroup.maxVertInfluences : 1); } } property bool IsStaticGroup { bool get( void ) { return RawGroup.maxVertInfluences == 0; } } property PrimitiveType PrimitiveType { ::Libx42::PrimitiveType get( void ) { return (::Libx42::PrimitiveType)RawGroup.primType; } } property int ElementCount { int get( void ) { return (int)RawGroup.numElems; } } property int PrimitiveCount { int get( void ); } property InfluenceCollection^ Influences { InfluenceCollection^ get( void ) { return infs; } } property IndexCollection^ Indices { IndexCollection^ get( void ) { return indices; } } property VertexData^ Vertices { VertexData^ get( void ) { return verts; } } internal: Group( Model ^owner, int index ); private: Model ^owner; int index; InfluenceCollection ^infs; IndexCollection^ indices; VertexData^ verts; }; public ref class GroupCollection : public ModelItemCollection< Group^ > { public: internal: GroupCollection( Model ^owner, int minGroup, int maxGroup ); }; };