Simple game engine with complete export to scripting language
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

41 行
553 B

  1. #include "SceneGraph.h"
  2. namespace BlueCore
  3. {
  4. SceneGraph::SceneGraph()
  5. {
  6. _RootNode = new SceneNode("root node");
  7. }
  8. SceneGraph::~SceneGraph()
  9. {
  10. }
  11. SceneNode* SceneGraph::getRootNode()
  12. {
  13. return _RootNode.pointer();
  14. }
  15. void SceneGraph::setCamera(Camera *camera)
  16. {
  17. _Camera = camera;
  18. }
  19. Camera* SceneGraph::getCamera()const
  20. {
  21. return _Camera.pointer();
  22. }
  23. void SceneGraph::update(Scalar time)
  24. {
  25. _RootNode->update (time);
  26. }
  27. void SceneGraph::queue (RenderQueue *queue)
  28. {
  29. _RootNode->queue (queue, _Camera);
  30. }
  31. }