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

The DtRenderer owns the component systems that draw. This class is a group node which serves as a node in the OSG scenegraph that will allow the component systems to cull and draw.

There is only one of these nodes created by DtOsgRenderer and it is connected to the OSG scenegraph near the top of the graph.

When it's time to cull, this node will provide camera data to each system so that each system can collect items to be rendered.

When it's time to render, this node will provide camera data to each system so that each system can render the items that were visible during cull. It also provides backing GPU buffers to systems.

For example, a system's staging buffer(s) will be transfered to a backing GPU buffer when the staging data changes, and then finally submitted to opengl. A backing GPU buffer(s) will be created for each unique system.

This DtOsgComponentSystemNode has drawables underneath it in the osg scenegraph. Each drawable represents a render state and a specific point in the osg scenegraph. Currently only 1 drawable is required and that drawable is for the alpha-to-coverage draw bin. If more drawables are required in the future, then each drawable should maintain a list of systems that use it, or the system itself should define which draw bins it wants to use.

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

Public Member Functions

 DtOsgComponentSystemNode (DtDe &de)
 
 DtOsgComponentSystemNode (const DtOsgComponentSystemNode &orig, const osg::CopyOp &opr)
 
virtual ~DtOsgComponentSystemNode ()
 
 DtOsgComponentSystemNode ()=delete
 
 DtOsgComponentSystemNode (const DtOsgComponentSystemNode &other)=delete
 
DtOsgComponentSystemNodeoperator= (const DtOsgComponentSystemNode &other)=delete
 
virtual void releaseGLObjects (osg::State *state=0) const override
 
virtual osg::Object * clone (const osg::CopyOp &copyop) const
 
virtual osg::Object * cloneType () const
 
virtual void deleteGeode ()
 
virtual void drawObjects (osg::RenderInfo &renderInfo, const DtOsgComponentSystemDrawable &drawable)
 

Protected Member Functions

virtual void slot_reloadShaders ()
 
virtual void traverse (osg::NodeVisitor &nv)
 
virtual bool cullObjects (osg::Camera *cam, const DtModelSetId modelSetId)
 
virtual void restoreOsgState (osg::State *state)
 
virtual bool drawGeom3dLinesSystem (osg::RenderInfo &renderInfo, osg::Camera *camera, bool skyRendering)
 
virtual bool drawGeom3dSpheresSystem (osg::RenderInfo &renderInfo, osg::Camera *camera, bool skyRendering)
 

Protected Attributes

DtDemyDe
 
DtSignalConnectionManager myConnections
 
osg::ref_ptr< osg::Geode > myGeode
 
osg::ref_ptr< osg::Drawable > myDrawable
 
Frustum_64 myFrustum
 
Dt3dLinesCameraRenderermyGeom3dLinesCameraRenderer
 
Dt3dSpheresCameraRenderermyGeom3dSpheresCameraRenderer
 

Private Member Functions

osg::Node * getChildNodeByName (osg::Group *parent, const char *name)
 
void connectSignals ()
 

Constructor & Destructor Documentation

makVrv::DtOsgComponentSystemNode::DtOsgComponentSystemNode ( DtDe de)

CTOR.

makVrv::DtOsgComponentSystemNode::DtOsgComponentSystemNode ( const DtOsgComponentSystemNode orig,
const osg::CopyOp &  opr 
)

Copy constructor needed because it is derived from osg::Group.

virtual makVrv::DtOsgComponentSystemNode::~DtOsgComponentSystemNode ( )
virtual

DTOR.

makVrv::DtOsgComponentSystemNode::DtOsgComponentSystemNode ( )
delete

Default Constructor not implemented.

makVrv::DtOsgComponentSystemNode::DtOsgComponentSystemNode ( const DtOsgComponentSystemNode other)
delete

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtOsgComponentSystemNode& makVrv::DtOsgComponentSystemNode::operator= ( const DtOsgComponentSystemNode other)
delete

Assignment Operator not implemented - Assignment not allowed.

virtual void makVrv::DtOsgComponentSystemNode::releaseGLObjects ( osg::State *  state = 0) const
overridevirtual

release gl for fog patch and fog effect

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

required functions for derriving from osg::Group

virtual osg::Object* makVrv::DtOsgComponentSystemNode::cloneType ( ) const
inlinevirtual
virtual void makVrv::DtOsgComponentSystemNode::deleteGeode ( )
virtual

Tell the group to delete its specific children.

virtual void makVrv::DtOsgComponentSystemNode::drawObjects ( osg::RenderInfo &  renderInfo,
const DtOsgComponentSystemDrawable drawable 
)
virtual

Draw all objects for the given drawable. The drawable represents a render state and a specific point in the osg scenegraph. For example, there is a drawable for systems that need to be drawn in the alpha-to-coverage bin. This is called from the drawable itself during draw.

virtual void makVrv::DtOsgComponentSystemNode::slot_reloadShaders ( )
protectedvirtual

Signal handler to reload the shaders.

virtual void makVrv::DtOsgComponentSystemNode::traverse ( osg::NodeVisitor &  nv)
protectedvirtual

Traverse.

virtual bool makVrv::DtOsgComponentSystemNode::cullObjects ( osg::Camera *  cam,
const DtModelSetId  modelSetId 
)
protectedvirtual

Cull objects for current camera. Returns true is there is something to draw. Returns false if all object were culled.

Parameters
camThe current camera.
virtual void makVrv::DtOsgComponentSystemNode::restoreOsgState ( osg::State *  state)
protectedvirtual

Called after all objects have been drawn to restore the osg state and/or flag osg state objects dirty so they can be applied later.

virtual bool makVrv::DtOsgComponentSystemNode::drawGeom3dLinesSystem ( osg::RenderInfo &  renderInfo,
osg::Camera *  camera,
bool  skyRendering 
)
protectedvirtual

Helper for drawObjects to specifically draw the Geom3dLinesSystem. returns true if objects were drawn/processed.

virtual bool makVrv::DtOsgComponentSystemNode::drawGeom3dSpheresSystem ( osg::RenderInfo &  renderInfo,
osg::Camera *  camera,
bool  skyRendering 
)
protectedvirtual

Helper for drawObjects to specifically draw the Geom3dSpheresSystem. returns true if objects were drawn/processed.

osg::Node* makVrv::DtOsgComponentSystemNode::getChildNodeByName ( osg::Group *  parent,
const char name 
)
private

This is private and non-virtual because it's used in the constructor. This method returns the first child node that matches the given name.

void makVrv::DtOsgComponentSystemNode::connectSignals ( )
private

This is private and non-virtual because it's used in the constructor.

Connects all the signals.

Member Data Documentation

DtDe& makVrv::DtOsgComponentSystemNode::myDe
protected
DtSignalConnectionManager makVrv::DtOsgComponentSystemNode::myConnections
protected
osg::ref_ptr<osg::Geode> makVrv::DtOsgComponentSystemNode::myGeode
protected
osg::ref_ptr<osg::Drawable> makVrv::DtOsgComponentSystemNode::myDrawable
protected
Frustum_64 makVrv::DtOsgComponentSystemNode::myFrustum
protected
Dt3dLinesCameraRenderer* makVrv::DtOsgComponentSystemNode::myGeom3dLinesCameraRenderer
protected
Dt3dSpheresCameraRenderer* makVrv::DtOsgComponentSystemNode::myGeom3dSpheresCameraRenderer
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)