Model.pkg 1.2 KB

1234567891011121314151617181920212223242526272829
  1. $#include "Model.h"
  2. /// 3D model resource.
  3. class Model : public Resource
  4. {
  5. public:
  6. /// Return bounding box.
  7. const BoundingBox& GetBoundingBox() const { return boundingBox_; }
  8. /// Return skeleton.
  9. Skeleton& GetSkeleton() { return skeleton_; }
  10. /// Return number of geometries.
  11. unsigned GetNumGeometries() const { return geometries_.Size(); }
  12. /// Return number of LOD levels in geometry.
  13. unsigned GetNumGeometryLodLevels(unsigned index) const;
  14. /// Return geometry by index and LOD level. The LOD level is clamped if out of range.
  15. Geometry* GetGeometry(unsigned index, unsigned lodLevel) const;
  16. /// Return number of vertex morphs.
  17. unsigned GetNumMorphs() const { return morphs_.Size(); }
  18. /// Return vertex morph by index.
  19. const ModelMorph* GetMorph(unsigned index) const;
  20. /// Return vertex morph by name.
  21. const ModelMorph* GetMorph(const String& name) const;
  22. /// Return vertex morph by name hash.
  23. const ModelMorph* GetMorph(StringHash nameHash) const;
  24. /// Return vertex buffer morph range start.
  25. unsigned GetMorphRangeStart(unsigned bufferIndex) const;
  26. /// Return vertex buffer morph range vertex count.
  27. unsigned GetMorphRangeCount(unsigned bufferIndex) const;
  28. };