Model.pkg 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. $#include "Graphics/Model.h"
  2. class Model : public Resource
  3. {
  4. Model();
  5. ~Model();
  6. // SharedPtr<Model> Clone(const String cloneName = String::EMPTY) const;
  7. tolua_outside Model* ModelClone @ Clone(const String cloneName = String::EMPTY) const;
  8. void SetBoundingBox(const BoundingBox& box);
  9. void SetNumGeometries(unsigned num);
  10. bool SetNumGeometryLodLevels(unsigned index, unsigned num);
  11. bool SetGeometry(unsigned index, unsigned lodLevel, Geometry* geometry);
  12. bool SetGeometryCenter(unsigned index, const Vector3& center);
  13. const BoundingBox& GetBoundingBox() const;
  14. Skeleton& GetSkeleton();
  15. unsigned GetNumGeometries() const;
  16. unsigned GetNumGeometryLodLevels(unsigned index) const;
  17. Geometry* GetGeometry(unsigned index, unsigned lodLevel) const;
  18. const Vector3& GetGeometryCenter(unsigned index) const;
  19. unsigned GetNumMorphs() const;
  20. const ModelMorph* GetMorph(const String name) const;
  21. const ModelMorph* GetMorph(StringHash nameHash) const;
  22. const ModelMorph* GetMorph(unsigned index) const;
  23. unsigned GetMorphRangeStart(unsigned bufferIndex) const;
  24. unsigned GetMorphRangeCount(unsigned bufferIndex) const;
  25. tolua_property__get_set BoundingBox& boundingBox;
  26. tolua_readonly tolua_property__get_set Skeleton skeleton;
  27. tolua_property__get_set unsigned numGeometries;
  28. tolua_readonly tolua_property__get_set unsigned numMorphs;
  29. };
  30. ${
  31. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Model_new00
  32. static int tolua_GraphicsLuaAPI_Model_new00(lua_State* tolua_S)
  33. {
  34. return ToluaNewObject<Model>(tolua_S);
  35. }
  36. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Model_new00_local
  37. static int tolua_GraphicsLuaAPI_Model_new00_local(lua_State* tolua_S)
  38. {
  39. return ToluaNewObjectGC<Model>(tolua_S);
  40. }
  41. static Model* ModelClone(const Model* model, const String& cloneName = String::EMPTY)
  42. {
  43. if (!model)
  44. return 0;
  45. SharedPtr<Model> clonedModelPtr = model->Clone(cloneName);
  46. Model* clonedModel = clonedModelPtr.Get();
  47. clonedModelPtr.Detach();
  48. return clonedModel;
  49. }
  50. $}