00001 //////////////////////////////////////////////////////////////////////////////// 00002 // Scorched3D (c) 2000-2009 00003 // 00004 // This file is part of Scorched3D. 00005 // 00006 // Scorched3D is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 2 of the License, or 00009 // (at your option) any later version. 00010 // 00011 // Scorched3D 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 Scorched3D; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 //////////////////////////////////////////////////////////////////////////////// 00020 00021 #if !defined(__INCLUDE_Modelh_INCLUDE__) 00022 #define __INCLUDE_Modelh_INCLUDE__ 00023 00024 #include <3dsparse/Mesh.h> 00025 #include <3dsparse/Bone.h> 00026 00027 class Model 00028 { 00029 public: 00030 Model(); 00031 virtual ~Model(); 00032 00033 Vector &getMin() { return min_; } 00034 Vector &getMax() { return max_; } 00035 std::vector<Mesh *> &getMeshes() { return meshes_; } 00036 std::vector<BoneType *> &getBaseBoneTypes() { return baseBoneTypes_; } 00037 std::vector<Bone *> &getBones() { return bones_; } 00038 int getNumberTriangles(); 00039 int getStartFrame() { return startFrame_; } 00040 int getTotalFrames() { return totalFrames_; } 00041 00042 // Used during building 00043 void setup(); 00044 void addMesh(Mesh *mesh) { meshes_.push_back(mesh); } 00045 void addBone(Bone *bone) { bones_.push_back(bone); } 00046 void setStartFrame(int frame) { startFrame_ = frame; } 00047 void setTotalFrames(int frames) { totalFrames_ = frames; } 00048 00049 protected: 00050 std::vector<Mesh *> meshes_; 00051 std::vector<Bone *> bones_; 00052 std::vector<BoneType *> baseBoneTypes_; 00053 Vector min_, max_; 00054 00055 int startFrame_; 00056 int totalFrames_; 00057 00058 void centre(); 00059 void setupBones(); 00060 void setupColor(); 00061 }; 00062 00063 #endif // __INCLUDE_Modelh_INCLUDE__
1.5.3