Loading...
Searching...
No Matches
tilingRenderer.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_RENDERING_TILINGRENDERER_H
#define BALL_VIEW_RENDERING_TILINGRENDERER_H
#ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
# include <BALL/VIEW/RENDERING/RENDERERS/renderer.h>
#endif
#ifndef BALL_VIEW_RENDERING_RENDERTARGET_H
# include <BALL/VIEW/RENDERING/renderTarget.h>
#endif
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT TilingRenderer
: public Renderer
{
public:
TilingRenderer(Renderer* real_renderer, Size final_width, Size final_height, Size border = 0);
TilingRenderer(const TilingRenderer& renderer);
virtual ~TilingRenderer() {}
virtual void setLights(bool reset_all = false);
virtual void updateCamera(const Camera* camera = 0);
virtual void updateBackgroundColor();
virtual bool finish();
virtual Vector3 mapViewportTo3D(Position x, Position y);
virtual Vector2 map3DToViewport(const Vector3& vec);
virtual bool renderOneRepresentation(const Representation& representation);
virtual void bufferRepresentation(const Representation& rep);
virtual void removeRepresentation(const Representation& rep);
virtual void setSize(float width, float height);
virtual void renderRuler();
virtual void renderToBuffer(RenderTarget* target);
virtual void render_(const GeometricObject* object);
protected:
void computeTilingSetup_();
Renderer* real_renderer_;
Size final_width_;
Size final_height_;
Size border_;
Size num_cols_;
Size num_rows_;
};
}
}
#endif // BALL_VIEW_RENDERING_TILINGRENDERER_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::VIEW::Camera
Definition camera.h:24
BALL::VIEW::GeometricObject
Definition geometricObject.h:37
BALL::VIEW::RenderTarget
Definition renderTarget.h:227
BALL::VIEW::Renderer::Renderer
Renderer()
BALL::VIEW::Representation
Definition representation.h:59
BALL::VIEW::TilingRenderer::map3DToViewport
virtual Vector2 map3DToViewport(const Vector3 &vec)
BALL::VIEW::TilingRenderer::finish
virtual bool finish()
BALL::VIEW::TilingRenderer::num_rows_
Size num_rows_
Definition tilingRenderer.h:137
BALL::VIEW::TilingRenderer::bufferRepresentation
virtual void bufferRepresentation(const Representation &rep)
BALL::VIEW::TilingRenderer::computeTilingSetup_
void computeTilingSetup_()
BALL::VIEW::TilingRenderer::final_width_
Size final_width_
The desired width of the final image.
Definition tilingRenderer.h:128
BALL::VIEW::TilingRenderer::setSize
virtual void setSize(float width, float height)
Set the size of the display.
BALL::VIEW::TilingRenderer::removeRepresentation
virtual void removeRepresentation(const Representation &rep)
BALL::VIEW::TilingRenderer::num_cols_
Size num_cols_
Definition tilingRenderer.h:136
BALL::VIEW::TilingRenderer::updateCamera
virtual void updateCamera(const Camera *camera=0)
BALL::VIEW::TilingRenderer::setLights
virtual void setLights(bool reset_all=false)
Set the light sources according to the stage.
BALL::VIEW::TilingRenderer::renderRuler
virtual void renderRuler()
BALL::VIEW::TilingRenderer::final_height_
Size final_height_
The desired height of the final image.
Definition tilingRenderer.h:131
BALL::VIEW::TilingRenderer::border_
Size border_
The border oversampled for each tile.
Definition tilingRenderer.h:134
BALL::VIEW::TilingRenderer::TilingRenderer
TilingRenderer(const TilingRenderer &renderer)
BALL::VIEW::TilingRenderer::real_renderer_
Renderer * real_renderer_
The renderer used for rendering the individual tiles.
Definition tilingRenderer.h:125
BALL::VIEW::TilingRenderer::render_
virtual void render_(const GeometricObject *object)
Wrapper for the renderering of special GeometricObjects.
BALL::VIEW::TilingRenderer::~TilingRenderer
virtual ~TilingRenderer()
Definition tilingRenderer.h:56
BALL::VIEW::TilingRenderer::renderOneRepresentation
virtual bool renderOneRepresentation(const Representation &representation)
BALL::VIEW::TilingRenderer::TilingRenderer
TilingRenderer(Renderer *real_renderer, Size final_width, Size final_height, Size border=0)
BALL::VIEW::TilingRenderer::renderToBuffer
virtual void renderToBuffer(RenderTarget *target)
BALL::VIEW::TilingRenderer::mapViewportTo3D
virtual Vector3 mapViewportTo3D(Position x, Position y)
BALL::VIEW::TilingRenderer::updateBackgroundColor
virtual void updateBackgroundColor()
Update the background color from the stage.
BALL::Vector2
TVector2< float > Vector2
Definition vector2.h:771
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
renderTarget.h
renderer.h