ModelNode.h 695 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef MODEL_NODE_H
  2. #define MODEL_NODE_H
  3. #include <boost/array.hpp>
  4. #include "SceneNode.h"
  5. #include "RsrcPtr.h"
  6. #include "Properties.h"
  7. #include "ModelPatchNode.h"
  8. #include "Vec.h"
  9. class Model;
  10. /// The model scene node
  11. class ModelNode: public SceneNode
  12. {
  13. public:
  14. ModelNode(): SceneNode(SNT_MODEL, true, NULL) {}
  15. /// @name Accessors
  16. /// @{
  17. const Model& getModel() const {return *model;}
  18. /// @}
  19. /// Initialize the node
  20. /// - Load the resource
  21. void init(const char* filename);
  22. /// @name Accessors
  23. /// @{
  24. const Vec<ModelPatchNode*>& getModelPatchNodees() const {return patches;}
  25. /// @}
  26. private:
  27. RsrcPtr<Model> model;
  28. Vec<ModelPatchNode*> patches;
  29. };
  30. #endif