AvogadroLibs 1.97.0
|
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, Identifier > | hits (int x, int y) const |
Identifier | hit (int x, int y) const |
Core::Array< Identifier > | hits (int x1, int y1, int x2, int y2) const |
bool | isValid () const |
std::string | error () const |
const Camera & | camera () const |
Camera & | camera () |
const Camera & | overlayCamera () const |
Camera & | overlayCamera () |
const Scene & | scene () const |
Scene & | scene () |
const TextRenderStrategy * | textRenderStrategy () const |
TextRenderStrategy * | textRenderStrategy () |
void | setTextRenderStrategy (TextRenderStrategy *tren) |
void initialize | ( | ) |
Initialize the OpenGL context for rendering.
void resize | ( | int | width, |
int | height | ||
) |
Resize the context in response to window management events.
void render | ( | ) |
Take care of rendering the scene, requires that the context is current.
void resetCamera | ( | ) |
Reset the view to fit the entire scene.
void resetGeometry | ( | ) |
Reset the scene geometry, this should be done when the scene geometry has changed in order to ensure correct clipping.
std::multimap< float, Identifier > hits | ( | int | x, |
int | y | ||
) | const |
Return the primitives under the display coordinate (x,y), mapped by depth.
Identifier hit | ( | int | x, |
int | y | ||
) | const |
Return the top primitive under the display coordinate (x,y).
Core::Array< Identifier > hits | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) | const |
Return the primitives in the rectangular area provided.
bool isValid | ( | ) | const |
Check whether the GL context is valid and supports required features.
std::string error | ( | ) | const |
Get the error message if the context is not valid. Empty if valid.
const Camera & camera | ( | ) | const |
Get the camera for this renderer.
const Camera & overlayCamera | ( | ) | const |
Get the overlay camera.
const Scene & scene | ( | ) | const |
Get the scene for this renderer.
const TextRenderStrategy * textRenderStrategy | ( | ) | const |
Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.
TextRenderStrategy * textRenderStrategy | ( | ) |
Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.
void setTextRenderStrategy | ( | TextRenderStrategy * | tren | ) |
Get/set the text rendering strategy for this object. The renderer takes ownership of the strategy object.