/****************************************************************************** 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 "BasicCollection.h" namespace Libx42 { ref class Model; ref class Group; public ref class IndexCollection : public BasicCollection< x42index_t > { public: /// /// Gets this index data chunk's starting index in the model's indices array. /// /// /// Thrown if this member is accessed on an implicit stream. /// property int Offset { int get( void ); } /// /// Gets the number of indices in this data chunk. /// property int Count { virtual int get( void ) override sealed { return count; } } property x42index_t default[int] { virtual x42index_t get( int index ) override sealed; } /// /// Gets whether the index values are implicit (always equal to index). /// This will always be true for non-indexed groups. /// property bool IsImplicit { bool get( void ) { return baseIndex == -1; } } virtual array< x42index_t >^ ToArray( void ) override sealed; internal: IndexCollection( Model ^owner ); IndexCollection( Model ^owner, Group ^group ); private: Model ^owner; int baseIndex, count; }; }