| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/opengl/objectcachegl.h>

Public Types | |
| enum | Mode { DISPLAYLIST_ONLY, DISPLAYLIST_AND_SCENE, SCENE_ONLY } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (Mode) | |
| ObjectCacheGL (SO< VRS::Iterator< SO< VRS::SharedObj > > > objects, Mode mode=ObjectCacheGL::DISPLAYLIST_AND_SCENE) | |
| ObjectCacheGL (SO< VRS::Iterator< SO< VRS::PolygonSet > > > objects) | |
| SO< SceneThing > | getScene () const |
| SO< Iterator< SO < MappedVertexAttributeShapeGL > > > | getVertexArrays () const |
| Bounds | boundingBox () const |
| Shapes define their bounding box in model coordinates. | |
| VRS_TYPEINFO (ObjectCacheGL, Shape) | |
| VRS_SERIALIZABLE (ObjectCacheGL) | |
Static Public Member Functions | |
| static void | setMaxVertices (unsigned int maxVertices=0xffff) |
| static unsigned int | getMaxVertices () |
| Returns the maxVertices value. | |
| static void | optimizeScene (SO< SceneThing > scene, bool enableRayIntersection=true) |
| VRS::ObjectCacheGL::ObjectCacheGL | ( | SO< VRS::Iterator< SO< VRS::SharedObj > > > | objects, | |
| Mode | mode = ObjectCacheGL::DISPLAYLIST_AND_SCENE | |||
| ) |
| VRS::ObjectCacheGL::ObjectCacheGL | ( | SO< VRS::Iterator< SO< VRS::PolygonSet > > > | objects | ) |
Constructs an ObjectCacheGL object for the given scene objects. The polygonsets contained in objects are merged into vertex arrays. The remaining objects are kept in one of three ways: DISPLAYLIST_ONLY: The objects are stored exclusively in a display list. (most efficient in terms of rendering speed and memory requirement) NOTE: SINCE THE ORIGINAL DATA IS NOT KEPT IN MEMORY, A CACHEOBJECT CONSTRUCTED IN THIS WAY CANNOT BE SERIALIZED! DISPLAYLIST_AND_SCENE: The remaining objects are stored as a Scene and a DisplayList representation. SCENE_ONLY: The remaining objects are stored explicitly and are rendered without using a DisplayList. The second constructor is for convenience. You can use it if you know that you want to insert exclusively PolygonSets.
| VRS::ObjectCacheGL::VRS_SERIALIZABLE_CLASS_ENUM | ( | Mode | ) |
| SO<SceneThing> VRS::ObjectCacheGL::getScene | ( | ) | const |
Used by the simplifier. It returns a scene containing all represented objects that are not of class PolygonSet. Dependent on the mode parameter the scene contains the objects directly or a DisplayList representing them.
| SO<Iterator<SO<MappedVertexAttributeShapeGL> > > VRS::ObjectCacheGL::getVertexArrays | ( | ) | const |
| Bounds VRS::ObjectCacheGL::boundingBox | ( | ) | const [virtual] |
| static void VRS::ObjectCacheGL::setMaxVertices | ( | unsigned int | maxVertices = 0xffff |
) | [static] |
Sets the maxVertices value. The maxVertices value is an internal upper limit for the number of vertices per array, i.e. all vertex arrays created internally have at most maxVertices vertices. Setting maxVertices to 0 disables the vertex limit. Changing the maxVertices value does not affect already existing ObjectCaches.
| static unsigned int VRS::ObjectCacheGL::getMaxVertices | ( | ) | [static] |
Returns the maxVertices value.
| static void VRS::ObjectCacheGL::optimizeScene | ( | SO< SceneThing > | scene, | |
| bool | enableRayIntersection = true | |||
| ) | [static] |
Traverses the given scene. If there are singular PolygonSets, they are replaced by appropriate MappedVertexAttributeSets. If a SceneThing contains multiple subsequent PolygonSets, they are combined in few MappedVertexAttributeShapes. 'enableRayIntersection' determines the data mirroring option for MappedVertexAttributeShapes.
| VRS::ObjectCacheGL::VRS_TYPEINFO | ( | ObjectCacheGL | , | |
| Shape | ||||
| ) |
| VRS::ObjectCacheGL::VRS_SERIALIZABLE | ( | ObjectCacheGL | ) |