#include <BALL/VIEW/RENDERING/glRenderer.h>
GLRenderer Renderer which provides hardware accelerated OPENGL rendering.
typedef HashMap<const Representation*, GLDisplayList*> BALL::VIEW::GLRenderer::DisplayListHashMap [protected] |
typedef HashMap<Name, const GeometricObject*> BALL::VIEW::GLRenderer::GeometricObjectHashMap [protected] |
typedef HashMap<const Representation*, vector<MeshBuffer*> > BALL::VIEW::GLRenderer::MeshBufferHashMap [protected] |
typedef unsigned int BALL::VIEW::GLRenderer::Name |
Typedef for OPENGL names.
typedef HashMap<const GeometricObject*, Name> BALL::VIEW::GLRenderer::NameHashMap [protected] |
DIRECT_RENDERING |
Render without display lists, directly to the Scene. |
DISPLAY_LISTS_RENDERING |
Render the contents of the display lists. |
REBUILD_DISPLAY_LISTS |
Rebuild the contents of the display lists and redraw them. |
BALL::VIEW::GLRenderer::GLRenderer | ( | ) |
Default Constructor.
virtual BALL::VIEW::GLRenderer::~GLRenderer | ( | ) | [virtual] |
Destructor.
virtual void BALL::VIEW::GLRenderer::bufferingDependentRender_ | ( | const Representation & | repr, | |
BufferMode | mode | |||
) | [virtual] |
void BALL::VIEW::GLRenderer::bufferRepresentation | ( | const Representation & | rep | ) | [virtual] |
Buffer the visualisation for the given Representation into OpenGL VertexBuffer Objects and DisplayLists.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::clear | ( | ) | [virtual] |
Explicit default initialization.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::clearNames_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::clearVertexBuffersFor | ( | Representation & | rep | ) |
void BALL::VIEW::GLRenderer::createBoxes_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::createDotBox_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::createDottedSphere_ | ( | int | precision | ) | [protected] |
void BALL::VIEW::GLRenderer::createLineBox_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::createSolidBox_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::createSpheres_ | ( | ) | [protected] |
Position BALL::VIEW::GLRenderer::createTextureFromGrid | ( | const RegularData3D & | grid, | |
const ColorMap & | map | |||
) |
void BALL::VIEW::GLRenderer::createTubes_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::drawBuffered | ( | const Representation & | rep | ) |
Draw the visualisation of the given Representation from the VertexBuffers and a DisplayList.
void BALL::VIEW::GLRenderer::dump | ( | std::ostream & | s, | |
Size | depth | |||
) | const |
void BALL::VIEW::GLRenderer::enterPickingMode | ( | ) |
void BALL::VIEW::GLRenderer::exitPickingMode | ( | ) |
void BALL::VIEW::GLRenderer::generateIlluminationTexture_ | ( | float | ka, | |
float | kd, | |||
float | kr, | |||
float | shininess | |||
) | [protected] |
DrawingMode BALL::VIEW::GLRenderer::getDrawingMode | ( | ) | const |
vector<String> BALL::VIEW::GLRenderer::getExtensions | ( | ) |
void BALL::VIEW::GLRenderer::getFrustum | ( | float & | near, | |
float & | far, | |||
float & | left, | |||
float & | right, | |||
float & | top, | |||
float & | bottom | |||
) |
Name BALL::VIEW::GLRenderer::getName | ( | const GeometricObject & | object | ) | [inline] |
GeometricObject* BALL::VIEW::GLRenderer::getObject | ( | GLRenderer::Name | name | ) | const |
String BALL::VIEW::GLRenderer::getOpenGLVersion | ( | ) |
String BALL::VIEW::GLRenderer::getRenderer | ( | ) |
RenderMode BALL::VIEW::GLRenderer::getRenderMode | ( | ) | const |
virtual bool BALL::VIEW::GLRenderer::getSmoothLines | ( | ) | [virtual] |
StereoMode BALL::VIEW::GLRenderer::getStereoMode | ( | ) | const |
Position BALL::VIEW::GLRenderer::getTextureIndex_ | ( | Position | x, | |
Position | y, | |||
Position | z, | |||
Size | width, | |||
Size | height | |||
) | [inline, protected] |
String BALL::VIEW::GLRenderer::getVendor | ( | ) |
float BALL::VIEW::GLRenderer::getXScale | ( | ) | const |
float BALL::VIEW::GLRenderer::getYScale | ( | ) | const |
bool BALL::VIEW::GLRenderer::hasDisplayListFor | ( | const Representation & | rep | ) | const |
Test if a Representation has a DisplayList.
virtual bool BALL::VIEW::GLRenderer::init | ( | const Stage & | stage, | |
float | width, | |||
float | height | |||
) | [virtual] |
Initialise the renderer, e.g. the display lists.
Reimplemented from BALL::VIEW::Renderer.
Initialization routines. This method is called by Scene::initializeGL.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::initAlwaysFront | ( | ) |
void BALL::VIEW::GLRenderer::initDrawingMeshes_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::initDrawingOthers_ | ( | ) | [protected] |
void BALL::VIEW::GLRenderer::initGLU_ | ( | DrawingMode | mode | ) | [protected] |
void BALL::VIEW::GLRenderer::initPerspective | ( | ) |
void BALL::VIEW::GLRenderer::initSolid | ( | ) |
void BALL::VIEW::GLRenderer::initTransparent | ( | ) |
Test if a given opengl extension is supported by the current driver. Call this only after Scene::initializeGL();
Compute the 2D position on the screen corresponding to the 3D point vec
Reimplemented from BALL::VIEW::Renderer.
bool BALL::VIEW::GLRenderer::mapViewplaneToScreen_ | ( | ) | [protected] |
Maps the current viewplane to screen coordinates. Returns false if the projection matrix is not correctly initialized.
Compute the 3D position on the view plane corresponding to point (x,y) on the view port
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::normalVector3_ | ( | const Vector3 & | v | ) | [protected] |
Pick geometric objects
x1,y1,x2,y2 | the rectangle of the selection |
void BALL::VIEW::GLRenderer::pickObjects2 | ( | List< GeometricObject * > & | objects | ) |
Pick geometric objects method2. Call this method after pickObjects1 and rendering the representations.
objects | returns the picked objects |
void BALL::VIEW::GLRenderer::removeRepresentation | ( | const Representation & | rep | ) | [virtual] |
Remove all VertexBuffer and DisplayLists for the given Representation.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::removeTextureFor_ | ( | const RegularData3D & | grid | ) |
virtual bool BALL::VIEW::GLRenderer::render | ( | const Representation & | representation, | |
bool | for_display_list = false | |||
) | [virtual] |
virtual void BALL::VIEW::GLRenderer::renderBox_ | ( | const Box & | ) | [protected, virtual] |
Render a box.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderClippingPlane_ | ( | const ClippingPlane & | plane | ) | [protected, virtual] |
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderDisc_ | ( | const Disc & | ) | [protected, virtual] |
Render a disc.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderGridVisualisation_ | ( | const GridVisualisation & | vol | ) | [protected, virtual] |
Render a grid slice.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderLabel_ | ( | const Label & | ) | [protected, virtual] |
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderLine_ | ( | const Line & | ) | [protected, virtual] |
Render a line.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderMesh_ | ( | const Mesh & | ) | [protected, virtual] |
Render a surface mesh.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderMultiLine_ | ( | const MultiLine & | line | ) | [protected, virtual] |
Render an illuminated line.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderPoint_ | ( | const Point & | ) | [protected, virtual] |
Render a single point.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderQuadMesh_ | ( | const QuadMesh & | ) | [protected, virtual] |
Render a quad mesh.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::renderRepresentation_ | ( | const Representation & | representation, | |
bool | for_display_list | |||
) | [protected] |
void BALL::VIEW::GLRenderer::renderRepresentations_ | ( | BufferMode | mode | ) | [protected] |
virtual void BALL::VIEW::GLRenderer::renderRuler | ( | ) | [protected, virtual] |
Render a ruler.
If supported by the renderer implementation, this function will produce a simple ruler that is rendered together with the other representations. The main use of this function is in the edit mode, where it can help to straighten-up structures and to correctly estimate angles and distances.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderSimpleBox_ | ( | const SimpleBox & | ) | [protected, virtual] |
Render a simple box (parallel to the axes).
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderSphere_ | ( | const Sphere & | ) | [protected, virtual] |
Render a sphere.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderToBuffer | ( | RenderTarget * | renderTarget, | |
BufferMode | ||||
) | [virtual] |
This function renders into the buffer of the RenderTarget which has to be made current before this function is called. Buffers are not automatically swapped afterwards!
virtual void BALL::VIEW::GLRenderer::renderTube_ | ( | const Tube & | ) | [protected, virtual] |
Render a tube.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderTwoColoredLine_ | ( | const TwoColoredLine & | ) | [protected, virtual] |
Render a line with two colors.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::renderTwoColoredTube_ | ( | const TwoColoredTube & | ) | [protected, virtual] |
Render a tube with two colors.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::scale_ | ( | float | f | ) | [protected] |
void BALL::VIEW::GLRenderer::scaleVector3_ | ( | const Vector3 & | v | ) | [protected] |
void BALL::VIEW::GLRenderer::setAntialiasing | ( | bool | state | ) |
Enable or disable antialiasing.
void BALL::VIEW::GLRenderer::setColor4ub_ | ( | const GeometricObject & | object | ) | [protected] |
void BALL::VIEW::GLRenderer::setColorRGBA_ | ( | const ColorRGBA & | color | ) |
virtual void BALL::VIEW::GLRenderer::setLights | ( | bool | reset_all = false |
) | [virtual] |
Set the light sources according to the stage.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::setRenderMode | ( | RenderMode | mode | ) | [inline] |
Set the size of the display.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::GLRenderer::setSmoothLines | ( | bool | smooth_lines | ) | [virtual] |
Should the lines in the line representation and the wireframe models be smoothed?
void BALL::VIEW::GLRenderer::setStereoMode | ( | StereoMode | state | ) |
void BALL::VIEW::GLRenderer::setupGridClipPlanes_ | ( | const GridVisualisation & | slice | ) | [protected] |
Sets this renderer as a part of a stereo setup.
eye_separation denotes the distance along the right vector used by this "eye".
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::subdivideTriangle_ | ( | Vector3 & | v1, | |
Vector3 & | v2, | |||
Vector3 & | v3, | |||
int | precision | |||
) | [protected] |
void BALL::VIEW::GLRenderer::texCoordVector3_ | ( | const Vector3 & | v | ) | [inline, protected] |
References BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
void BALL::VIEW::GLRenderer::translateVector3_ | ( | const Vector3 & | v | ) | [protected] |
virtual void BALL::VIEW::GLRenderer::updateBackgroundColor | ( | ) | [virtual] |
Update the background color from the stage.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::GLRenderer::updateCamera | ( | const Camera * | camera = 0 |
) | [virtual] |
Update the camera position either from a given Camera, or from the default Stage.
Reimplemented from BALL::VIEW::Renderer.
bool BALL::VIEW::GLRenderer::vertexBuffersEnabled | ( | ) | const |
bool BALL::VIEW::GLRenderer::vertexBuffersSupported | ( | ) | const |
void BALL::VIEW::GLRenderer::vertexVector3_ | ( | const Vector3 & | v | ) |
friend class Scene [friend] |
Name BALL::VIEW::GLRenderer::all_names_ [protected] |
float BALL::VIEW::GLRenderer::bottom_ [protected] |
GLuint BALL::VIEW::GLRenderer::cel_texture_ [protected] |
Position BALL::VIEW::GLRenderer::display_lists_index_ [protected] |
bool BALL::VIEW::GLRenderer::drawed_mesh_ [protected] |
bool BALL::VIEW::GLRenderer::drawed_other_object_ [protected] |
DrawingMode BALL::VIEW::GLRenderer::drawing_mode_ [protected] |
Index BALL::VIEW::GLRenderer::drawing_precision_ [protected] |
float BALL::VIEW::GLRenderer::far_ [protected] |
GLDisplayList* BALL::VIEW::GLRenderer::GL_boxes_list_ [protected] |
GLDisplayList* BALL::VIEW::GLRenderer::GL_spheres_list_ [protected] |
GLDisplayList* BALL::VIEW::GLRenderer::GL_tubes_list_ [protected] |
GLUquadricObj* BALL::VIEW::GLRenderer::GLU_quadric_obj_ [protected] |
HashMap<const RegularData3D*, Position> BALL::VIEW::GLRenderer::grid_to_texture_ [protected] |
float BALL::VIEW::GLRenderer::left_ [protected] |
GLDisplayList BALL::VIEW::GLRenderer::line_list_ [protected] |
GLubyte BALL::VIEW::GLRenderer::line_tex_[128][128][4] [protected] |
GLuint BALL::VIEW::GLRenderer::line_texture_bind_ [protected] |
ModelType BALL::VIEW::GLRenderer::model_type_ [protected] |
float BALL::VIEW::GLRenderer::near_ [protected] |
Vector3 BALL::VIEW::GLRenderer::normal_vector_ [protected] |
GLuint BALL::VIEW::GLRenderer::object_buffer_[BALL_GLRENDERER_PICKING_NUMBER_OF_MAX_OBJECTS] [protected] |
NameHashMap BALL::VIEW::GLRenderer::object_to_name_ [protected] |
bool BALL::VIEW::GLRenderer::picking_mode_ [protected] |
RenderMode BALL::VIEW::GLRenderer::render_mode_ [protected] |
float BALL::VIEW::GLRenderer::right_ [protected] |
bool BALL::VIEW::GLRenderer::single_pick_ [protected] |
bool BALL::VIEW::GLRenderer::smooth_lines_ [protected] |
GLDisplayList* BALL::VIEW::GLRenderer::sphere_list_ [protected] |
StereoMode BALL::VIEW::GLRenderer::stereo_ [protected] |
float BALL::VIEW::GLRenderer::top_ [protected] |
bool BALL::VIEW::GLRenderer::use_vertex_buffer_ [protected] |
float BALL::VIEW::GLRenderer::x_scale_ [protected] |
float BALL::VIEW::GLRenderer::y_scale_ [protected] |