AvogadroLibs 1.97.0
Public Member Functions | List of all members
GLRenderer Class Reference

Render the scene using OpenGL calls. More...

#include <avogadro/rendering/glrenderer.h>

Public Member Functions

void initialize ()
 
void resize (int width, int height)
 
void render ()
 
void resetCamera ()
 
void resetGeometry ()
 
std::multimap< float, Identifierhits (int x, int y) const
 
Identifier hit (int x, int y) const
 
Core::Array< Identifierhits (int x1, int y1, int x2, int y2) const
 
bool isValid () const
 
std::string error () const
 
const Cameracamera () const
 
Cameracamera ()
 
const CameraoverlayCamera () const
 
CameraoverlayCamera ()
 
const Scenescene () const
 
Scenescene ()
 
const TextRenderStrategytextRenderStrategy () const
 
TextRenderStrategytextRenderStrategy ()
 
void setTextRenderStrategy (TextRenderStrategy *tren)
 

Detailed Description

Author
Marcus D. Hanwell

Member Function Documentation

◆ initialize()

void initialize ( )

Initialize the OpenGL context for rendering.

◆ resize()

void resize ( int  width,
int  height 
)

Resize the context in response to window management events.

◆ render()

void render ( )

Take care of rendering the scene, requires that the context is current.

◆ resetCamera()

void resetCamera ( )

Reset the view to fit the entire scene.

◆ resetGeometry()

void resetGeometry ( )

Reset the scene geometry, this should be done when the scene geometry has changed in order to ensure correct clipping.

◆ hits() [1/2]

std::multimap< float, Identifier > hits ( int  x,
int  y 
) const

Return the primitives under the display coordinate (x,y), mapped by depth.

◆ hit()

Identifier hit ( int  x,
int  y 
) const

Return the top primitive under the display coordinate (x,y).

◆ hits() [2/2]

Core::Array< Identifier > hits ( int  x1,
int  y1,
int  x2,
int  y2 
) const

Return the primitives in the rectangular area provided.

◆ isValid()

bool isValid ( ) const

Check whether the GL context is valid and supports required features.

See also
error() to get more information if the context is not valid.

◆ error()

std::string error ( ) const

Get the error message if the context is not valid. Empty if valid.

◆ camera()

const Camera & camera ( ) const

Get the camera for this renderer.

◆ overlayCamera()

const Camera & overlayCamera ( ) const

Get the overlay camera.

◆ scene()

const Scene & scene ( ) const

Get the scene for this renderer.

◆ textRenderStrategy() [1/2]

const TextRenderStrategy * textRenderStrategy ( ) const

Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.

◆ textRenderStrategy() [2/2]

TextRenderStrategy * textRenderStrategy ( )

Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.

◆ setTextRenderStrategy()

void setTextRenderStrategy ( TextRenderStrategy tren)

Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.


The documentation for this class was generated from the following file: