![]() |
VR-Forces 4.7 Class Documentation
|
Derived from osg::Node and is a replacement for the osgSim::LightPointNode represents a group of light points that share a common origin location. More...

Classes | |
| struct | LightPointInfo |
| structure for holding all the information required to describe a single light point. More... | |
Public Member Functions | |
| DtLightPointNode () | |
| Default contructor. | |
| DtLightPointNode (const DtLightPointNode &lpn, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| Copy constructor using CopyOp to manage deep vs shallow copy. | |
| META_Node (vrvOsg, DtLightPointNode) | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| Traverse function which if called by the cull visitor then it sets up the Light Points to be drawn. | |
| virtual void | updateDrawable (const osg::Camera *camera, int frameNum, double simTime, osg::Matrixf &modelViewMatrix, osgUtil::CullVisitor *cv, int groupId, bool shouldCull, float maxVisibleDistance, float posScale, float radiusScale, bool isInstancedReflection=false) |
| Makes sure the drawable has enough instances and light points for this node and passes model view matrix to the Light Point Manager 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 | addTypedLightPoint (const osg::Vec3d &pos, int type, std::string id, const osg::Vec3 &rotation, float phaseShift) |
| add a typed light point to this node. | |
| virtual void | setLightPointManager (DtOsgLightPointManager *lightPointManager) |
| keep a local copy of the light point manager pointer. Also needed since the Light Point Node does not have a reference to the DE. | |
| virtual DtOsgLightPointManager * | findLightPointManager () |
| get the light point manager that this light point node is using. | |
| virtual void | setLightPointsEnabled (bool enabled) |
| Turn all the light points for this node on or off. | |
| virtual bool | lightPointsEnabled () |
| Are all the light points for this node on or off. | |
| virtual void | setGroupId (int id) |
| Set the nodes group id. This overrides the light points individual group id unless it is set to 0. | |
| virtual int | groupId () |
| get the nodes group id. | |
| void | freeNodeIdIfNecessary (unsigned int maxNodeIds) |
| Free up some node Id's if there are more than maxNodeIds allocated. | |
| virtual osg::BoundingSphere | computeBound () const |
| Compute the bounds for this node based on all the light points it contains. | |
| virtual void | transformLightPointPositions (osg::Matrix &adjustmentMatrix) |
| Apply a matrix to the light point positions used by the optimizer to remove the matrix transforms above the light points. | |
Protected Types | |
| typedef std::vector < LightPointInfo > | LightPointIntList |
Protected Member Functions | |
| virtual | ~DtLightPointNode () |
| DTOR. | |
Protected Attributes | |
| osg::BoundingBox | myMutableBoundingBox |
| LightPointIntList | myLightPointTypeList |
| DtOsgLightPointManager * | myLightPointManager |
| osg::ref_ptr < DtLightPointDrawable > | myLightPointDrawable |
| std::vector< int > | myNodeIds |
| const osg::Camera * | myLastCamera |
| int | myFrameNum |
| int | myCurrentInstance |
| int | myAddedInstances |
| bool | myLightPointsEnabled |
| int | myGroupId |
Static Protected Attributes | |
| static int | theFrameNum |
| static const osg::Camera * | theLastCamera |
Derived from osg::Node and is a replacement for the osgSim::LightPointNode represents a group of light points that share a common origin location.
In addition to their origin the light point node can group them for things like airport or runway groupings. traversal of this node by the cull visitor passes the view matrix to the light point manager to be placed in an SSBO. Instance manager uses updateDrawable to do the same thing that traversal does for the non instanced case.
|
protected |
| makVrv::DtLightPointNode::DtLightPointNode | ( | ) |
Default contructor.
| makVrv::DtLightPointNode::DtLightPointNode | ( | const DtLightPointNode & | lpn, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Copy constructor using CopyOp to manage deep vs shallow copy.
|
protectedvirtual |
DTOR.
| makVrv::DtLightPointNode::META_Node | ( | vrvOsg | , |
| DtLightPointNode | |||
| ) |
|
virtual |
Traverse function which if called by the cull visitor then it sets up the Light Points to be drawn.
|
virtual |
Makes sure the drawable has enough instances and light points for this node and passes model view matrix to the Light Point Manager 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 |
add a typed light point to this node.
This currently does not work correctly if this node has already been drawn once. position and rotation are in light point node local space. So the light point node's transform is applied to to the light points before they are drawn. The model view matrix for the light point node does this and is passed down to the shader in the updateDrawable function.
|
virtual |
keep a local copy of the light point manager pointer. Also needed since the Light Point Node does not have a reference to the DE.
|
virtual |
get the light point manager that this light point node is using.
|
virtual |
Turn all the light points for this node on or off.
|
virtual |
Are all the light points for this node on or off.
|
virtual |
Set the nodes group id. This overrides the light points individual group id unless it is set to 0.
|
virtual |
get the nodes group id.
Free up some node Id's if there are more than maxNodeIds allocated.
This is used to free up the instanced model light points if a instance is free'd. The reason for using the max id instead of always removing a node id every time and instance is free'd is because the light point may have never been drawn so it may not need to be removed.
|
virtual |
Compute the bounds for this node based on all the light points it contains.
|
virtual |
Apply a matrix to the light point positions used by the optimizer to remove the matrix transforms above the light points.
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |