Viewport.pkg 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. $#include "Viewport.h"
  2. /// %Viewport definition either for a render surface or the backbuffer.
  3. class Viewport
  4. {
  5. public:
  6. /// Construct with defaults.
  7. Viewport(Context* context);
  8. /// Construct with a full rectangle.
  9. Viewport(Context* context, Scene* scene, Camera* camera, RenderPath* renderPath = 0);
  10. /// Construct with a specified rectangle.
  11. Viewport(Context* context, Scene* scene, Camera* camera, const IntRect& rect, RenderPath* renderPath = 0);
  12. /// Destruct.
  13. ~Viewport();
  14. /// Set scene.
  15. void SetScene(Scene* scene);
  16. /// Set camera.
  17. void SetCamera(Camera* camera);
  18. /// Set rectangle.
  19. void SetRect(const IntRect& rect);
  20. /// Set rendering path.
  21. void SetRenderPath(RenderPath* path);
  22. /// Set rendering path from an XML file.
  23. void SetRenderPath(XMLFile* file);
  24. /// Return scene.
  25. Scene* GetScene() const;
  26. /// Return camera.
  27. Camera* GetCamera() const;
  28. /// Return rectangle.
  29. const IntRect& GetRect() const { return rect_; }
  30. /// Return rendering path.
  31. RenderPath* GetRenderPath() const;
  32. };