VR-Forces 4.6.1 Class Documentation
 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. More...

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

Classes

struct  LightPointVertexAttrib
 Structure that matches the format of the data that is sent down as vertex attributes for the light points. More...

Public Member Functions

virtual void releaseGLObjects (osg::State *state) const
 DtLightPointDrawable (DtDe &de)
 main contructor for the DtLightPointDrawable.
 DtLightPointDrawable (const DtLightPointDrawable &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::Object * clone (const osg::CopyOp &copyop) const
 required functions for deriving from osg::Drawable couldn't use META_Node because it didn't compile
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 setLightPointManager (DtOsgLightPointManager *lpManager)
 end required functions for deriving
virtual DtOsgLightPointManagerfindLightPointManger ()
 Getter for the connected light point manager.
virtual void addLightPoint (const LightPointVertexAttrib &attribData)
 Add a light point to this drawable.
virtual void removeLightPoints (const std::vector< int > &nodeIds)
 Remove all the light points that are associated with the specified nodeIds.
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 Setup the openGL state and draw all the light points (and debug labels if enabled)
virtual void setSimulationTime (double time)
 Set the current simulation time which is used by the blink animations.
virtual double simulationTime () const
 Get the currrent simulation time.
virtual osg::BoundingBox computeBoundingBox () const
 compute the bounding box based on all the light points

Protected Types

typedef std::vector
< LightPointVertexAttrib
LightPointList

Protected Member Functions

void slot_reverseZChanged (bool flag)
 slot for handling when reverseZ changes.
virtual ~DtLightPointDrawable ()
 Destructor.

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
DtSignalConnectionManager mySignals

Detailed Description

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.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtLightPointDrawable::DtLightPointDrawable ( DtDe de)

main contructor 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 ( )
inlineprotectedvirtual

Destructor.

Member Function Documentation

virtual void makVrv::DtLightPointDrawable::releaseGLObjects ( osg::State *  state) const
virtual
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::setLightPointManager ( DtOsgLightPointManager lpManager)
virtual

end required functions for deriving

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

void makVrv::DtLightPointDrawable::slot_reverseZChanged ( bool  flag)
protected

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
DtSignalConnectionManager makVrv::DtLightPointDrawable::mySignals
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)