![]() |
VR-Forces Developer's Guide
|
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.

Public Member Functions | |
| DtOsgLightPointManager (DtDe &de) | |
| virtual void | findAndRegisterLightPoints (osg::Node *node, const DtLightPointRegistrationParameters ¶ms) |
| virtual void | registerLightPoints (const DtLightPointNodeAndXformVector &lightPoints, const DtLightPointRegistrationParameters ¶ms) |
| virtual DtLightPointNode * | createLightPointNode (osg::Node *nodeRef, bool daylightControlled) |
| virtual DtGlBuffer * | lightPointTypeBuffer () |
| virtual DtGlBuffer * | lightPointGroupBuffer () |
| virtual DtGlBuffer * | lightPointNodeBuffer (osg::Camera *camera) |
| virtual void | updateLightPointVertexBuffer (const std::vector< DtLightPointDrawable::LightPointVertexAttrib > &vertexAttribData, int minChanged, int maxChanged) |
| virtual DtGlBuffer * | lightPointVertexBufer () |
| virtual int | nodeId (DtLightPointNode *lpNode, int instanceId) |
| virtual void | slot_preTick () |
| virtual void | slot_attributesChanged (const DtElementAttributeManager::EntryAttributesList &) |
| virtual void | clearNodeBuffer (const osg::Camera *camera) |
| unsigned int | nodeBufferMaxNodeId (const osg::Camera *camera) |
| virtual void | setNodeBufferData (int nodeId, const osg::Camera *camera, const DtLightPointNodeDataLayout &nodeData) |
| virtual void | processImGui () |
| virtual DtLightPointDrawable * | masterLightPointDrawable () |
| virtual bool | debugLabelsEnabled () const |
| virtual bool | debugDirectionEnabled () const |
| virtual bool | softerLightPointsEnabled () const |
| virtual float | softenIntensity () const |
| virtual void | setShouldReplaceOsgSimLightPoints (bool enable) |
| virtual bool | shouldReplaceOsgSimLightPoints () |
| virtual void | freeNodeIds (std::vector< int > &nodeIds) |
| virtual void | releaseGLObjects (osg::State *state) const |
| virtual void | setInstanceReflectionMatrix (const osg::Camera *camera, const osg::Matrixf &reflectMat) |
| virtual const osg::Matrixf & | instanceReflectionMatrix (const osg::Camera *camera) |
| virtual bool | entityInstanceGroupInformation (const std::string &modelDefinitionName, const std::string &entityInstanceName, int &firstGroupId, int &numberOfLightPointGroups) |
| virtual int | entitySubLightPointGroupIndex (const std::string &modelDefinitionName, const std::string &subLightPointGroupName) |
| virtual void | removeGroupsForEntityInstance (const std::string &modelDefinitionName, const std::string &entityInstanceName) |
| virtual int | registerNewEntityInstanceAndGetStartingGroupIdIndex (const std::string &modelDefinitionName, const std::string &entityInstanceName) |
| virtual bool | drawLightPoints () |
| virtual DtDebugLabelMode | debugLabelMode () const |
| virtual const std::string | searchNodeHierarchyForGroupName (osg::Node *sourceNode) const |
Public Member Functions inherited from makVrv::DtLightPointManager | |
| DtLightPointManager (DtDe &de) | |
| virtual bool | groupExists (const std::string &group) const |
| virtual DtColorValue | groupColor (const std::string &group) |
| virtual int | groupId (const std::string &group, bool increaseReferenceCount=false) |
| virtual int | lightPointMaxCode () |
| void | setGroupColor (const std::string &group, float colorR, float colorG, float colorB, float colorA) |
| virtual void | setGroupColor (const std::string &group, const DtColorValue &color, bool createGroupIfNonexistent=true) |
| virtual const GroupIdMap & | groupIdMap () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtOsgLightPointManager & | instanceAsDtOsgLightPointManager (DtDe &de) |
Static Public Member Functions inherited from makVrv::DtLightPointManager | |
| static bool | isLightPointGroupNameComplete (const std::string &lightPointGroupName) |
| static DtLightPointManager & | instance (DtDe &de) |
| static void | registerInstance (DtDe &de, DtLightPointManager *manager) |
| static const std::string & | theClassName () |
| static float | defaultLightPointRange () |
Public Attributes | |
| boost::signalslib::signal < void(LightPointNodeObsSet &)> | signal_lightPointsRegistered |
| boost::signalslib::signal < void(DtDebugLabelMode)> | signal_debugLabelModeChanged |
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 Member Functions | |
| virtual | ~DtOsgLightPointManager () |
| virtual void | slot_reloadShaders () |
| virtual void | setupShaders () |
| const std::string | parseNodeGroupName (osg::Node *node) const |
| virtual LightPointNodeObsSet | aggregateLightPoints (const DtLightPointNodeAndXformVector &lightPoints, const DtLightPointRegistrationParameters ¶ms) |
| virtual void | populateLightPointNode (osg::Node *nodeRef, DtLightPointNode *dtLpRef, bool daylightControlled, bool newNode) |
| virtual const std::string | specialCaseSearchForCreatorGeneratedRunwayGroups (osg::Node *searchNode) const |
Protected Member Functions inherited from makVrv::DtLightPointManager | |
| virtual | ~DtLightPointManager () |
| void | local_setGroupColor (const std::string &group, const DtColorValue &color, bool createGroupIfNonexistent) |
Static Protected Member Functions | |
| static void | cleanupNodes (osg::Node *node) |
Private Member Functions | |
| DtOsgLightPointManager ()=delete | |
| DtOsgLightPointManager (const DtOsgLightPointManager &other)=delete | |
| DtOsgLightPointManager & | operator= (const DtOsgLightPointManager &other)=delete |
Additional Inherited Members | |
Public Types inherited from makVrv::DtLightPointManager | |
| typedef std::pair< std::string, DtLightPointGroupEntry > | GroupIdPair |
| typedef std::map< std::string, DtLightPointGroupEntry > | 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 |
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtOsgLightPointManager::DtOsgLightPointManager | ( | DtDe & | de | ) |
Light point manager contructor used by instance() call to setup the singleton instance.
|
privatedelete |
No default construction allowed.
|
privatedelete |
Copy Constructor not implemented – Copy Not Allowed.
|
protectedvirtual |
DTOR.
|
static |
get the DtOsgLightPointManger from the de instance registry
|
privatedelete |
Assignment Operator Not implemented – Assignment Not Allowed.
|
virtual |
Traverse the provided node and find all the light points and then pass them to registerLightPoints.
When light points are registered as indirected, i.e. isIndirected is set to true, then the group ids set on the light point node starts at 0 and increases by one with each unique light point group found in the model. This is because the light point node is shared between multiple instances and therefore the light point node's group id must be agnostic of the instance - for more information see the documentation for DtOsgLightPointManager::lightPointGroupBuffer.
| node | The node whose hierarchy we will search for light point nodes. |
| groupName | The alias, complete or not, to associate the registered light point nodes under. For more information, see DtOsgLightPointManager::isLightPointGroupNameComplete. |
| modelDefinitionName | The name of the model definition associated with the node. This is only used if isIndirected is true. |
| daylightControlled | This is only used if the light points do not already have a type specified. |
| fadeParameters | Parameters which controls how the registered light points will fade. |
| combineLightPoints | Should only be true for nodes belonging to osgEarth::Layer objects. |
| isIndirected | If true, the group ids set on the light point nodes will be set differently. |
|
virtual |
Register a list of non instanced light points.
When light points are registered as indirected, i.e. isIndirected is set to true, then the group ids set on the light point node starts at 0 and increases by one with each unique light point group found in the model. This is because the light point node is shared between multiple instances and therefore the light point node's group id must be agnostic of the instance - for more information see the documentation for DtOsgLightPointManager::lightPointGroupBuffer.
| node | The node whose hierarchy we will search for light point nodes. |
| groupName | The alias, complete or not, to associate the registered light point nodes under. For more information, see DtOsgLightPointManager::isLightPointGroupNameComplete. |
| modelDefinitionName | The name of the model definition associated with the node. This is only used if isIndirected is true. |
| daylightControlled | This is only used if the light points do not already have a type specified. |
| fadeParameters | Parameters which controls how the registered light points will fade. |
| combineLightPoints | Should only be true for nodes belonging to osgEarth::Layer objects. |
| isIndirected | If true, the group ids set on the light point nodes will be set differently. |
|
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.
For indirect geometries:
For example, if you have two instances (Bob & Bill) of the same model which has two light point groups (anchor_lights & spot_lights) configured for it, the buffer may look like: ... | Bob:anchor_lights | Bob:spot_lights | Bill:anchor_lights | Bill:spot_lights | ... index 21 index 22 index 23 index 24 The light point node(s) will be shared between Bob and Bill, so the group id on the light point node(s) belonging to each light point group would be:
|
virtual |
Get and setup the light point node buffer SSBO. This contains all the model view matrices for all the light point nodes. there is a node buffer per camera because we need a view matrix for each camera.
|
virtual |
positions and information about their direction and blinking. Also contains ids for the type, node, and group
|
virtual |
get the ssbo for the light point vertex data. This contains the light point positions and information about their direction and blinking. Also contains ids for the type, node, and group
|
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 |
|
virtual |
Clear the node buffer for a particular camera.
get the number of node ids avilable for this camera's node buffer
|
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.
|
virtual |
Get group information about a particular entity instance - returns true if successful, false otherwise.
|
virtual |
Get the entity sub LightPoint group index.
|
virtual |
Remove all registered light point groups associated with the provided entity.
|
virtual |
Register light point groups for an entity and return the starting index for the entity's light point properties.
|
virtual |
controlled by IMgui and is used to stop drawing/culling light points entirely.
|
virtual |
Get the type of debug label we will be visualizing.
|
virtual |
look at the given node and it's parents to see if there is a group setup Currently supports light_group comments or runway wizard generated names
|
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 |
utility function for checking a node for the light_group comment.
|
protectedvirtual |
combine light points that can be combined into less nodes and convert them into DtLightPointNodes if needed as well.
|
protectedvirtual |
Add incoming light points to an existing light point node.
|
protectedvirtual |
|
staticprotected |
Remove empty nodes, recursively upward in the graph. Some nodes are made empty by the light point aggregator, and are the only child of their parent, so can be removed, and so forth up into the graph.
| boost::signalslib::signal<void(LightPointNodeObsSet&)> makVrv::DtOsgLightPointManager::signal_lightPointsRegistered |
Emitted when the terrain patch has light points added.
| boost::signalslib::signal<void(DtDebugLabelMode)> makVrv::DtOsgLightPointManager::signal_debugLabelModeChanged |
Emitted when the debug label moed has changed.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |