![]() |
VR-Forces 4.6.1 Class Documentation
|
DtOsgLightPointManager registers LightPoint nodes so their TBO can be created and updated in a single place. More...

Public Member Functions | |
| DtOsgLightPointManager (DtDe &de) | |
| Light point manager contructor used by instance() call to setup the singleton instance. | |
| virtual void | registerInstancedLightPoints (DtInstanceManager::LightPointVec &lightPoints, bool daylightControlled) |
| Register a list of instanced light points daylightControlled is only used if the light points do not already have a type specified. | |
| virtual LightPointNodeObsSet | registerLightPoints (LightPointNodeObsSet lightPoints, const std::string &groupName="", bool daylightControlled=false) |
| Register a list of non instanced light points daylightControlled is only used if the light points do not already have a type specified. | |
| virtual DtLightPointNode * | createLightPointNode (osg::Node *nodeRef, bool daylightControlled) |
| Create a DtLightPointNode based on an osgSim::LightPointNode also removes the osgSim::LightPointNode from the scenegraph Does nothing if shouldReplaceOsgSimLightPoints is set to false which is currently the default setting. | |
| virtual DtGlBuffer * | lightPointTypeBuffer () |
| Get and setup the light point type SSBO used for rendering the light points. | |
| virtual DtGlBuffer * | lightPointGroupBuffer () |
| Get and setup the light point group SSBO. | |
| virtual DtGlBuffer * | lightPointNodeBuffer (osg::Camera *camera) |
| Get and setup the light point node buffer SSBO. | |
| virtual int | nodeId (DtLightPointNode *lpNode, int instanceId) |
| get the node id for the specified node and instance | |
| virtual void | slot_preTick () |
| handle the preTick signal. This clears the light point node buffer and updates the imGui | |
| virtual void | clearNodeBuffer (const osg::Camera *camera) |
| Clear the node buffer for a particular camera. | |
| virtual void | setNodeBufferData (int nodeId, osg::Matrixf &modelView, osg::Vec4f &eyeLocal, int groupId, const osg::Camera *camera, float posScale, float radiusScale, bool isInstancedReflection) |
| Set the light point node data for a particular node id (a node id is a one to one mapping to a node + instance) posScale is used to scale the position of the light point when model scaling is being used with instanced models radiusScale is used to scale the radius of the light point when model scaling is being used with any model. | |
| virtual void | processImGui () |
| Update the imGui debug Gui and process any changes from the Gui. | |
| virtual DtLightPointDrawable * | masterLightPointDrawable () |
| Get the master light point drawable that is used to draw all the light points. | |
| virtual bool | debugLabelsEnabled () |
| Check to see if debug labels are enabled. They are controlled by the imGui debug Gui. | |
| virtual bool | debugDirectionEnabled () |
| Check to see if debug direcion light points should be drawn. | |
| virtual bool | softerLightPointsEnabled () |
| Check to see if soften light points is enabled. | |
| virtual float | softenIntensity () |
| Get the intensity of the softening for the light points. | |
| virtual void | setShouldReplaceOsgSimLightPoints (bool enable) |
| Set if the light point manager should replace osgSim light point nodes with DtLightPointNodes this defaults to false for now and is controlled by an environment variable in the managers contructor. | |
| virtual bool | shouldReplaceOsgSimLightPoints () |
| Get if the light point manager should replace osgSim light point nodes with DtLightPointNodes this defaults to false for now and is controlled by an environment variable in the managers contructor. | |
| virtual void | freeNodeIds (std::vector< int > &nodeIds) |
| When a DtLightPointNode is deleted it calls this in order to free up the nodeIds. | |
| virtual void | releaseGLObjects (osg::State *state) const |
| virtual void | setInstanceReflectionMatrix (const osg::Camera *camera, const osg::Matrixf &reflectMat) |
| sets up the reflection pass matrix that converts from the main camera view space to the reflection camera view space. | |
| virtual const osg::Matrixf & | instanceReflectionMatrix (const osg::Camera *camera) |
| gets the reflection pass matrix that converts from the main camera view space to the reflection camera view space. | |
Public Member Functions inherited from makVrv::DtLightPointManager | |
| DtLightPointManager (DtDe &de) | |
| Light point manager contructor used by instance() call to setup the singleton instance. | |
| virtual DtColorValue | groupColor (const std::string &group) |
| Get the current value of the group color for the specified group string. | |
| virtual int | groupId (const std::string &group) |
| get the groupId assigned to the specified group string used by the light point nodes and light point groups to associate a node or type to a group in the shader. | |
| virtual DtLightPointTable & | lightsTable () |
| get the lights table which contains all the light point type settings. | |
| void | setGroupColor (const std::string &group, float colorR, float colorG, float colorB, float colorA) |
| Set the current value of the group color for the specified group string should only be called on a master display engine and distributes the color to the slaves. | |
| virtual void | setGroupColor (const std::string &group, const DtColorValue &color) |
| Set the current value of the group color for the specified group string should only be called on a master display engine and distributes the color to the slaves. | |
| virtual const GroupIdMap & | groupIdMap () |
| Get the current groupIdMap. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtOsgLightPointManager & | instanceAsDtOsgLightPointManager (DtDe &de) |
| get the DtOsgLightPointManger from the de instance registry | |
Static Public Member Functions inherited from makVrv::DtLightPointManager | |
| static DtLightPointManager & | instance (DtDe &de) |
| Get/create the DtLightPointManager instance. | |
| static void | registerInstance (DtDe &de, DtLightPointManager *manager) |
| static const std::string & | theClassName () |
| Get the name used to register this class. | |
| static float | defaultLightPointRange () |
| default light point range for when the light point should disappear | |
Public Attributes | |
| boost::signal< void(LightPointNodeObsSet &)> | signal_lightPointsRegistered |
| Emitted when the terrain patch has light points added. | |
Protected Types | |
| typedef std::map< const osg::Camera *, std::vector < float > > | CameraVectorMap |
| typedef std::pair < DtLightPointNode *, int > | nodeIntPair |
| typedef std::map< nodeIntPair, int > | NodeIdMap |
| typedef std::map< std::string, GroupIdMap > | ParentGroupIdMap |
Protected Types inherited from makVrv::DtLightPointManager | |
| typedef std::vector< DtColorValue > | ColorVector |
Protected Member Functions | |
| virtual | ~DtOsgLightPointManager () |
| DTOR. | |
| virtual void | slot_reloadShaders () |
| Handle the reload shaders signal and reload the shaders for the managed light points. | |
| virtual void | setupShaders () |
| Reload the shaders and assign them to the drawables VP. | |
| int | parseNodeGroupId (osg::Node *lightPointNode) |
| look at the light point node and it's parents to see if there is a group setup Currently supports light_group comments or runway wizard generated names | |
| std::string | parseNodeGroupName (osg::Node *node) |
| utility function for checking a node for the light_group comment. | |
Protected Member Functions inherited from makVrv::DtLightPointManager | |
| virtual | ~DtLightPointManager () |
| DTOR. | |
| void | local_setGroupColor (const std::string &group, const DtColorValue &color) |
| Set the current value of the group color for the specified group string called indirectly by setGroupColor and is used by the DtDeSharedState to modify the color for a group. | |
Protected Attributes | |
| DtGlBuffer * | myLightPointTypeBuffer |
| DtGlBuffer * | myLightPointGroupBuffer |
| CameraVectorMap | myLightPointNodeDataMap |
| DtGlBuffer * | myLightPointNodeBuffer |
| NodeIdMap | myNodeIds |
| std::set< int > | myFreeNodeIds |
| boost::mutex | myMutex |
| osg::ref_ptr < DtLightPointDrawable > | myMasterLightPointDrawable |
| bool | myDebugLabelsEnabled |
| bool | myDebugDirectionEnabled |
| bool | myShouldReplaceOsgSimLightPoints |
| bool | mySofterLightPointsEnabled |
| float | mySoftenIntensity |
| GroupIdMap | myImGuiProcessedGroupIds |
| ParentGroupIdMap | myImGuiGroups |
| std::map< const osg::Camera *, osg::Matrixf > | myInstanceReflectionMatrix |
Protected Attributes inherited from makVrv::DtLightPointManager | |
| DtSignalConnectionManager | mySignals |
| DtDe & | myDe |
| DtLightPointTable | myLightsTable |
| GroupIdMap | myGroupIds |
| ColorVector | myGroupColors |
Additional Inherited Members | |
Public Types inherited from makVrv::DtLightPointManager | |
| typedef std::pair< std::string, int > | GroupIdPair |
| typedef std::map< std::string, int > | GroupIdMap |
Static Protected Attributes inherited from makVrv::DtLightPointManager | |
| static const std::string | theLightFilename |
| static const std::string | theLightTunningFilename |
| static const std::string | theLightDefaultValuesXmlFilename |
| static const std::string | theLightDefaultValuesCsvFilename |
DtOsgLightPointManager registers LightPoint nodes so their TBO can be created and updated in a single place.
Main access point for adding light points to the new system. It registers the light points which (if enabled) replaces the osgSim::LightPointNodes with DtLightPointNodes or just passes a pointer for the DtOsgLightPointManager to the DtLightPointNode in the case of CDB light points. It also converts osgSim::LightPoint objects to a light point type and manages the loading of the light point table which has the default light point types in it. Creates the DtLightPointDrawable object that draws all the light points. Handles the creation and updating of the SSBO(Shader Storage Buffer Object) which is how the light type, light node, and light group data is passed down to the GPU. Sets up the shaders which are added as Virtual Program functions to the DtLightPointDrawable. Sets up the imGui debug gui which can turn on debug labels and adjust the intensity of the light point groups.
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtOsgLightPointManager::DtOsgLightPointManager | ( | DtDe & | de | ) |
Light point manager contructor used by instance() call to setup the singleton instance.
|
protectedvirtual |
DTOR.
|
static |
get the DtOsgLightPointManger from the de instance registry
|
virtual |
Register a list of instanced light points daylightControlled is only used if the light points do not already have a type specified.
|
virtual |
Register a list of non instanced light points daylightControlled is only used if the light points do not already have a type specified.
|
virtual |
Create a DtLightPointNode based on an osgSim::LightPointNode also removes the osgSim::LightPointNode from the scenegraph Does nothing if shouldReplaceOsgSimLightPoints is set to false which is currently the default setting.
daylightControlled is only used if the light points do not already have a type specified
|
virtual |
Get and setup the light point type SSBO used for rendering the light points.
this buffer contains the data from the DtLightPointTable reorganized into a tightly packed list of only the data that is needed by the shader.
|
virtual |
Get and setup the light point group SSBO.
This buffer contains the intensity settings for all of the light point groups.
|
virtual |
Get and setup the light point node buffer SSBO.
This contains all the model view matricies for all the light point nodes. there is a node buffer per camera because we need a view matrix for each camera.
|
virtual |
get the node id for the specified node and instance
|
virtual |
handle the preTick signal. This clears the light point node buffer and updates the imGui
|
virtual |
Clear the node buffer for a particular camera.
|
virtual |
Set the light point node data for a particular node id (a node id is a one to one mapping to a node + instance) posScale is used to scale the position of the light point when model scaling is being used with instanced models radiusScale is used to scale the radius of the light point when model scaling is being used with any model.
|
virtual |
Update the imGui debug Gui and process any changes from the Gui.
|
virtual |
Get the master light point drawable that is used to draw all the light points.
|
virtual |
Check to see if debug labels are enabled. They are controlled by the imGui debug Gui.
|
virtual |
Check to see if debug direcion light points should be drawn.
|
virtual |
Check to see if soften light points is enabled.
|
virtual |
Get the intensity of the softening for the light points.
|
virtual |
Set if the light point manager should replace osgSim light point nodes with DtLightPointNodes this defaults to false for now and is controlled by an environment variable in the managers contructor.
|
virtual |
Get if the light point manager should replace osgSim light point nodes with DtLightPointNodes this defaults to false for now and is controlled by an environment variable in the managers contructor.
|
virtual |
When a DtLightPointNode is deleted it calls this in order to free up the nodeIds.
|
virtual |
|
virtual |
sets up the reflection pass matrix that converts from the main camera view space to the reflection camera view space.
|
virtual |
gets the reflection pass matrix that converts from the main camera view space to the reflection camera view space.
|
protectedvirtual |
Handle the reload shaders signal and reload the shaders for the managed light points.
|
protectedvirtual |
Reload the shaders and assign them to the drawables VP.
|
protected |
look at the light point node and it's parents to see if there is a group setup Currently supports light_group comments or runway wizard generated names
|
protected |
utility function for checking a node for the light_group comment.
| boost::signal<void(LightPointNodeObsSet&)> makVrv::DtOsgLightPointManager::signal_lightPointsRegistered |
Emitted when the terrain patch has light points added.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |