![]() |
VR-Forces 4.0.4 Class Documentation
|
A cache responsible for storing osg shape geodes. More...

Classes | |
| struct | IndexBufferKey |
| struct | IndexBufferKey_hash |
| struct | ShapeKey |
| struct | ShapeKey_hash |
Public Types | |
| enum | ShapeType { ShadedCube, ShadedCylinder } |
Public Member Functions | |
| DtOsgShapeCache () | |
| CTOR. | |
| virtual | ~DtOsgShapeCache () |
| DTOR. | |
| void | releaseResources () |
| Release any hardware resources. | |
| void | ts_clearInstancingCache () |
| Releases any instance memory. | |
| osg::Drawable * | getShapeInstance (ShapeType, unsigned int faceCount) |
| Get a shape instance with a given level of detail). | |
| osg::DrawElementsUInt * | getCircularIndexBuffer (int vertexCount, int firstIndex, int indexStep) |
| Get a shared circular index buffer for a particular number of vertices This allows for easy circular vertex buffers as the indices are doubled. | |
Static Public Member Functions | |
| static DtOsgShapeCache & | instance (DtDe &de) |
| Get an instance of the DtOsgShape cache. | |
Protected Types | |
| typedef boost::unordered_map < ShapeKey, osg::ref_ptr < osg::Drawable > , ShapeKey_hash > | ShapeMap |
| typedef boost::unordered_map < IndexBufferKey, osg::ref_ptr < osg::DrawElementsUInt > , IndexBufferKey_hash > | IndexBufferMap |
Protected Member Functions | |
| virtual osg::Drawable * | createShapeInstance (ShapeType, unsigned int faceCount) |
| Create a particular shape instance. | |
Protected Attributes | |
| ShapeMap | myShapeMap |
| IndexBufferMap | myIndexBufferMap |
A cache responsible for storing osg shape geodes.
Each shape is a unit size (1x1x1).
typedef boost::unordered_map<ShapeKey, osg::ref_ptr<osg::Drawable>, ShapeKey_hash > makVrv::DtOsgShapeCache::ShapeMap [protected] |
typedef boost::unordered_map<IndexBufferKey, osg::ref_ptr<osg::DrawElementsUInt>, IndexBufferKey_hash > makVrv::DtOsgShapeCache::IndexBufferMap [protected] |
CTOR.
| virtual makVrv::DtOsgShapeCache::~DtOsgShapeCache | ( | ) | [virtual] |
DTOR.
| static DtOsgShapeCache& makVrv::DtOsgShapeCache::instance | ( | DtDe & | de | ) | [static] |
Get an instance of the DtOsgShape cache.
Release any hardware resources.
Releases any instance memory.
| osg::Drawable* makVrv::DtOsgShapeCache::getShapeInstance | ( | ShapeType | , |
| unsigned int | faceCount | ||
| ) |
Get a shape instance with a given level of detail).
| osg::DrawElementsUInt* makVrv::DtOsgShapeCache::getCircularIndexBuffer | ( | int | vertexCount, |
| int | firstIndex, | ||
| int | indexStep | ||
| ) |
Get a shared circular index buffer for a particular number of vertices This allows for easy circular vertex buffers as the indices are doubled.
For a vertex count of 2, an index buffer of 0,1,0 is returned. The length will be 2 * vertexCount -1.
| virtual osg::Drawable* makVrv::DtOsgShapeCache::createShapeInstance | ( | ShapeType | , |
| unsigned int | faceCount | ||
| ) | [protected, virtual] |
Create a particular shape instance.
ShapeMap makVrv::DtOsgShapeCache::myShapeMap [protected] |