Model.pkg 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. $#include "Model.h"
  2. class Model : public Resource
  3. {
  4. // SharedPtr<Model> Clone(const String cloneName = String::EMPTY) const;
  5. tolua_outside Model* ModelClone @ Clone(const String cloneName = String::EMPTY) const;
  6. const BoundingBox& GetBoundingBox() const;
  7. Skeleton& GetSkeleton();
  8. unsigned GetNumGeometries() const;
  9. unsigned GetNumGeometryLodLevels(unsigned index) const;
  10. Geometry* GetGeometry(unsigned index, unsigned lodLevel) const;
  11. unsigned GetNumMorphs() const;
  12. const ModelMorph* GetMorph(const String name) const;
  13. const ModelMorph* GetMorph(StringHash nameHash) const;
  14. const ModelMorph* GetMorph(unsigned index) const;
  15. unsigned GetMorphRangeStart(unsigned bufferIndex) const;
  16. unsigned GetMorphRangeCount(unsigned bufferIndex) const;
  17. tolua_readonly tolua_property__get_set BoundingBox& boundingBox;
  18. tolua_readonly tolua_property__get_set Skeleton skeleton;
  19. tolua_readonly tolua_property__get_set unsigned numGeometries;
  20. tolua_readonly tolua_property__get_set unsigned numMorphs;
  21. };
  22. ${
  23. static Model* ModelClone(const Model* model, const String& cloneName = String::EMPTY)
  24. {
  25. if (!model)
  26. return 0;
  27. SharedPtr<Model> clonedModelPtr = model->Clone(cloneName);
  28. Model* clonedModel = clonedModelPtr.Get();
  29. clonedModelPtr.Detach();
  30. return clonedModel;
  31. }
  32. $}