![]() |
VR-Forces 5.0.3 Developer's Guide
|
Class derived from osg::Drawable to handle all DtLightPointNode light points it gathers all the light points and renders them all in a single draw call. Draws all the light points in a single draw call. The light points are added by the DtLightPointNodes to the DtLightPointDrawable and each light point ends up with an entry in the vertex arrays for the light points. In addition to the light points themselves, there are debug light point sprites that are used to draw debug labels above the light points. Because they are using the same state and vertex attributes, the drawing of the labels is extremely fast (so fast I have not been able to see a measurable{ in the F2 stats } difference between having them on or off) The labels are turned on using an imGui checkbox. which is setup by the light point manager.

Classes | |
| struct | LightPointVertexAttrib |
Public Member Functions | |
| DtLightPointDrawable (DtDe &de) | |
| DtLightPointDrawable (const DtLightPointDrawable &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| virtual osg::Object * | cloneType () const |
| virtual bool | isSameKindAs (const osg::Object *obj) const |
| virtual const char * | className () const |
| virtual const char * | libraryName () const |
| virtual void | accept (osg::NodeVisitor &nv) |
| virtual void | releaseGLObjects (osg::State *state) const |
| virtual void | accept (osg::PrimitiveFunctor &functor) const |
| virtual GLuint64 | getTextureAddress (osg::Texture *myLightPointTexture) |
| virtual void | setLightPointManager (DtOsgLightPointManager *lpManager) |
| virtual DtOsgLightPointManager * | findLightPointManger () |
| virtual void | addLightPoint (const LightPointVertexAttrib &attribData) |
| virtual void | removeLightPoints (const std::vector< int > &nodeIds) |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| virtual void | setSimulationTime (double time) |
| virtual double | simulationTime () const |
| virtual osg::BoundingBox | computeBoundingBox () const |
Protected Types | |
| typedef std::vector < LightPointVertexAttrib > | LightPointList |
| typedef std::map< osg::ref_ptr < osg::Texture >, GLuint64 > | TextureToAddressMap |
| typedef std::set< osg::ref_ptr < osg::Texture > > | TextureSet |
| typedef std::set< osg::ref_ptr < osg::Texture::TextureObject > > | SetOsgTextureObjects |
| typedef std::map < osg::observer_ptr< const osg::GraphicsContext > , SetOsgTextureObjects > | MapGraphicsContextsToSetOsgTextureObjects |
Protected Member Functions | |
| virtual | ~DtLightPointDrawable () |
| virtual void | init () |
| virtual void | setUpReverseZ (bool flag) |
| virtual void | processTextureAddresses (osg::RenderInfo &renderInfo) const |
| virtual void | addTextureToGCMap (osg::GraphicsContext *gContext, osg::Texture::TextureObject *texObj) const |
| virtual bool | inTextureToGCMap (osg::GraphicsContext *gContext, osg::Texture::TextureObject *texObj) const |
Protected Attributes | |
| double | mySimulationTime |
| LightPointList | myLightPointList |
| osg::ref_ptr< osg::Depth > | myDepthOn |
| osg::ref_ptr< osg::BlendFunc > | myBlendFunc |
| osg::ref_ptr< osg::BlendEquation > | myBlendEquation |
| DtOsgLightPointManager * | myLightPointManager |
| osg::ref_ptr< osg::Texture > | myDigitTexture |
| DtDe & | myDe |
| osg::ref_ptr< osg::Uniform > | myTimeUniform |
| DtSignalConnectionManager | mySignals |
| int | myMutableLightPointListMinChanged |
| int | myMutableLightPointListMaxChanged |
| bool | myInitialized |
| osg::ref_ptr< osg::PointSprite > | mySprite |
| TextureToAddressMap | myMutableTextureToAddress |
| TextureSet | myMutableTexturesToGetAddressesFor |
| MapGraphicsContextsToSetOsgTextureObjects | myMapGraphicsContextToTexturesArray |
| DtGlDeleteObjectManager & | myGlDeleteObjectManager |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtLightPointDrawable::DtLightPointDrawable | ( | DtDe & | de | ) |
main constructor for the DtLightPointDrawable. Should only be called by DtOsgLightPointManager which should only create a single instance of this class
| makVrv::DtLightPointDrawable::DtLightPointDrawable | ( | const DtLightPointDrawable & | , |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Copy constructor using CopyOp to manage deep vs shallow copy.
|
protectedvirtual |
Destructor.
|
inlinevirtual |
required functions for deriving from osg::Drawable couldn't use META_Node because it didn't compile
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
end required functions for deriving
Release the gl objects for the light points such as textures.
|
virtual |
override of Drawable function which allows the osg Statistics to work for light points
|
virtual |
Get the bindless texture address for a particular texture. this adds the texture to the set of textures waiting for addresses or gets the texture address if it is already available.
|
virtual |
Setter for connecting this drawable to the light point manager. Allows us to avoid unnecessary calls to DtOsgLightPointManager::instance()
|
virtual |
Getter for the connected light point manager.
|
virtual |
Add a light point to this drawable.
|
virtual |
Remove all the light points that are associated with the specified nodeIds.
|
virtual |
Setup the openGL state and draw all the light points (and debug labels if enabled)
|
virtual |
Set the current simulation time which is used by the blink animations.
|
virtual |
Get the currrent simulation time.
|
virtual |
compute the bounding box based on all the light points
|
protectedvirtual |
initializes the uniforms and state attributes for the drawable.
|
protectedvirtual |
slot for handling when reverseZ changes.
|
protectedvirtual |
process all the textures that might be needed for light points
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protected |