VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtLightPointDrawable Class Reference

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.

Inheritance diagram for makVrv::DtLightPointDrawable:
Inheritance graph
[legend]

Classes

struct  LightPointVertexAttrib
 

Public Member Functions

 DtLightPointDrawable (DtDe &de)
 
 DtLightPointDrawable (const DtLightPointDrawable &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual osg::Object * clone (const osg::CopyOp &copyop) const
 
virtual osg::Object * cloneType () const
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const charclassName () const
 
virtual const charlibraryName () const
 
virtual void accept (osg::NodeVisitor &nv)
 
virtual void releaseGLObjects (osg::State *state) const
 
virtual void accept (osg::PrimitiveFunctor &functor) const
 
virtual void setLightPointManager (DtOsgLightPointManager *lpManager)
 
virtual DtOsgLightPointManagerfindLightPointManger ()
 
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
 

Protected Member Functions

virtual ~DtLightPointDrawable ()
 
virtual void init ()
 
virtual void setUpReverseZ (bool flag)
 

Protected Attributes

double mySimulationTime
 
LightPointList myLightPointList
 
osg::ref_ptr< osg::Depth > myDepthOn
 
osg::ref_ptr< osg::BlendFunc > myBlendFunc
 
osg::ref_ptr< osg::BlendEquation > myBlendEquation
 
DtOsgLightPointManagermyLightPointManager
 
osg::ref_ptr< osg::Texture > myDigitTexture
 
DtDemyDe
 
osg::ref_ptr< osg::Uniform > myTimeUniform
 
int myMutableLightPointListMinChanged
 
int myMutableLightPointListMaxChanged
 
bool myInitialized
 
osg::ref_ptr< osg::PointSprite > mySprite
 

Member Typedef Documentation

Constructor & Destructor Documentation

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.

virtual makVrv::DtLightPointDrawable::~DtLightPointDrawable ( )
protectedvirtual

Destructor.

Member Function Documentation

virtual osg::Object* makVrv::DtLightPointDrawable::clone ( const osg::CopyOp &  copyop) const
inlinevirtual

required functions for deriving from osg::Drawable couldn't use META_Node because it didn't compile

virtual osg::Object* makVrv::DtLightPointDrawable::cloneType ( ) const
inlinevirtual
virtual bool makVrv::DtLightPointDrawable::isSameKindAs ( const osg::Object *  obj) const
inlinevirtual
virtual const char* makVrv::DtLightPointDrawable::className ( ) const
inlinevirtual
virtual const char* makVrv::DtLightPointDrawable::libraryName ( ) const
inlinevirtual
virtual void makVrv::DtLightPointDrawable::accept ( osg::NodeVisitor &  nv)
inlinevirtual
virtual void makVrv::DtLightPointDrawable::releaseGLObjects ( osg::State *  state) const
virtual

end required functions for deriving

Release the gl objects for the light points such as textures.

virtual void makVrv::DtLightPointDrawable::accept ( osg::PrimitiveFunctor &  functor) const
virtual

override of Drawable function which allows the osg Statistics to work for light points

virtual void makVrv::DtLightPointDrawable::setLightPointManager ( DtOsgLightPointManager lpManager)
virtual

Setter for connecting this drawable to the light point manager. Allows us to avoid unnecessary calls to DtOsgLightPointManager::instance()

virtual DtOsgLightPointManager* makVrv::DtLightPointDrawable::findLightPointManger ( )
virtual

Getter for the connected light point manager.

virtual void makVrv::DtLightPointDrawable::addLightPoint ( const LightPointVertexAttrib attribData)
virtual

Add a light point to this drawable.

virtual void makVrv::DtLightPointDrawable::removeLightPoints ( const std::vector< int > &  nodeIds)
virtual

Remove all the light points that are associated with the specified nodeIds.

virtual void makVrv::DtLightPointDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

Setup the openGL state and draw all the light points (and debug labels if enabled)

virtual void makVrv::DtLightPointDrawable::setSimulationTime ( double  time)
virtual

Set the current simulation time which is used by the blink animations.

virtual double makVrv::DtLightPointDrawable::simulationTime ( ) const
virtual

Get the currrent simulation time.

virtual osg::BoundingBox makVrv::DtLightPointDrawable::computeBoundingBox ( ) const
virtual

compute the bounding box based on all the light points

virtual void makVrv::DtLightPointDrawable::init ( )
protectedvirtual

initializes the uniforms and state attributes for the drawable.

virtual void makVrv::DtLightPointDrawable::setUpReverseZ ( bool  flag)
protectedvirtual

slot for handling when reverseZ changes.

Member Data Documentation

double makVrv::DtLightPointDrawable::mySimulationTime
protected
LightPointList makVrv::DtLightPointDrawable::myLightPointList
protected
osg::ref_ptr<osg::Depth> makVrv::DtLightPointDrawable::myDepthOn
protected
osg::ref_ptr<osg::BlendFunc> makVrv::DtLightPointDrawable::myBlendFunc
protected
osg::ref_ptr<osg::BlendEquation> makVrv::DtLightPointDrawable::myBlendEquation
protected
DtOsgLightPointManager* makVrv::DtLightPointDrawable::myLightPointManager
protected
osg::ref_ptr<osg::Texture> makVrv::DtLightPointDrawable::myDigitTexture
protected
DtDe& makVrv::DtLightPointDrawable::myDe
protected
osg::ref_ptr<osg::Uniform> makVrv::DtLightPointDrawable::myTimeUniform
protected
int makVrv::DtLightPointDrawable::myMutableLightPointListMinChanged
mutableprotected
int makVrv::DtLightPointDrawable::myMutableLightPointListMaxChanged
mutableprotected
bool makVrv::DtLightPointDrawable::myInitialized
protected
osg::ref_ptr<osg::PointSprite> makVrv::DtLightPointDrawable::mySprite
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)