![]() |
VR-Forces Developer's Guide
|
A cache responsible for storing osg shape geodes. Each shape is a unit size (1x1x1).

Classes | |
| struct | IndexBufferKey |
| struct | IndexBufferKey_hash |
| struct | ShapeKey |
| struct | ShapeKey_hash |
Public Types | |
| enum | ShapeType { ShadedCube, ShadedCylinder } |
Public Member Functions | |
| DtOsgShapeCache () | |
| virtual | ~DtOsgShapeCache () |
| void | releaseResources () |
| void | ts_clearInstancingCache () |
| osg::Drawable * | getShapeInstance (ShapeType, unsigned int faceCount) |
| osg::DrawElementsUInt * | getCircularIndexBuffer (unsigned int vertexCount, unsigned int firstIndex, unsigned int indexStep) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtOsgShapeCache & | instance (DtDe &de) |
Protected Types | |
| typedef std::unordered_map < ShapeKey, osg::ref_ptr < osg::Drawable > , ShapeKey_hash > | ShapeMap |
| typedef std::unordered_map < IndexBufferKey, osg::ref_ptr < osg::DrawElementsUInt > , IndexBufferKey_hash > | IndexBufferMap |
Protected Member Functions | |
| virtual osg::Drawable * | createShapeInstance (ShapeType, unsigned int faceCount) |
Protected Attributes | |
| ShapeMap | myShapeMap |
| IndexBufferMap | myIndexBufferMap |
|
protected |
|
protected |
| makVrv::DtOsgShapeCache::DtOsgShapeCache | ( | ) |
CTOR.
|
virtual |
DTOR.
|
static |
Get an instance of the DtOsgShape cache.
| void makVrv::DtOsgShapeCache::releaseResources | ( | ) |
Release any hardware resources.
| void makVrv::DtOsgShapeCache::ts_clearInstancingCache | ( | ) |
Releases any instance memory.
Get a shape instance with a given level of detail).
| osg::DrawElementsUInt* makVrv::DtOsgShapeCache::getCircularIndexBuffer | ( | unsigned int | vertexCount, |
| unsigned int | firstIndex, | ||
| unsigned 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.
|
protectedvirtual |
Create a particular shape instance.
|
protected |
|
protected |