StaticGeometryNode.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (C) 2009-2016, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <anki/scene/Common.h>
  7. #include <anki/scene/SceneNode.h>
  8. #include <anki/scene/SpatialComponent.h>
  9. #include <anki/scene/RenderComponent.h>
  10. namespace anki
  11. {
  12. /// @addtogroup scene
  13. /// @{
  14. /// Static geometry scene node patch
  15. class StaticGeometryPatchNode : public SceneNode
  16. {
  17. friend class StaticGeometryRenderComponent;
  18. public:
  19. StaticGeometryPatchNode(SceneGraph* scene);
  20. ~StaticGeometryPatchNode();
  21. ANKI_USE_RESULT Error create(
  22. const CString& name, const ModelPatch* modelPatch);
  23. private:
  24. const ModelPatch* m_modelPatch;
  25. ANKI_USE_RESULT Error buildRendering(RenderingBuildInfo& data) const;
  26. };
  27. /// Static geometry scene node
  28. class StaticGeometryNode : public SceneNode
  29. {
  30. public:
  31. StaticGeometryNode(SceneGraph* scene);
  32. ~StaticGeometryNode();
  33. ANKI_USE_RESULT Error create(const CString& name, const CString& filename);
  34. private:
  35. ModelResourcePtr m_model;
  36. };
  37. /// @}
  38. } // end namespace anki