Model.pkg 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. bool SetVertexBuffers(const Vector<SharedPtr<VertexBuffer> >& buffers, const PODVector<unsigned>& morphRangeStarts,
  10. const PODVector<unsigned>& morphRangeCounts);
  11. bool SetIndexBuffers(const Vector<SharedPtr<IndexBuffer> >& buffers);
  12. void SetNumGeometries(unsigned num);
  13. bool SetNumGeometryLodLevels(unsigned index, unsigned num);
  14. bool SetGeometry(unsigned index, unsigned lodLevel, Geometry* geometry);
  15. bool SetGeometryCenter(unsigned index, const Vector3& center);
  16. const BoundingBox& GetBoundingBox() const;
  17. Skeleton& GetSkeleton();
  18. unsigned GetNumGeometries() const;
  19. unsigned GetNumGeometryLodLevels(unsigned index) const;
  20. Geometry* GetGeometry(unsigned index, unsigned lodLevel) const;
  21. const Vector3& GetGeometryCenter(unsigned index) const;
  22. unsigned GetNumMorphs() const;
  23. const ModelMorph* GetMorph(const String name) const;
  24. const ModelMorph* GetMorph(StringHash nameHash) const;
  25. const ModelMorph* GetMorph(unsigned index) const;
  26. unsigned GetMorphRangeStart(unsigned bufferIndex) const;
  27. unsigned GetMorphRangeCount(unsigned bufferIndex) const;
  28. tolua_property__get_set BoundingBox& boundingBox;
  29. tolua_readonly tolua_property__get_set Skeleton skeleton;
  30. tolua_property__get_set unsigned numGeometries;
  31. tolua_readonly tolua_property__get_set unsigned numMorphs;
  32. };
  33. ${
  34. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Model_new00
  35. static int tolua_GraphicsLuaAPI_Model_new00(lua_State* tolua_S)
  36. {
  37. return ToluaNewObject<Model>(tolua_S);
  38. }
  39. #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Model_new00_local
  40. static int tolua_GraphicsLuaAPI_Model_new00_local(lua_State* tolua_S)
  41. {
  42. return ToluaNewObjectGC<Model>(tolua_S);
  43. }
  44. static Model* ModelClone(const Model* model, const String& cloneName = String::EMPTY)
  45. {
  46. if (!model)
  47. return 0;
  48. return model->Clone(cloneName).Detach();
  49. }
  50. $}