VR-Forces 5.0.2 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
makVrv::DtGlStudioDrawable Class Reference

The OSG Drawable that contains a GL Studio HUD.

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

Public Member Functions

 DtGlStudioDrawable ()
 
 DtGlStudioDrawable (disti::ComponentBase *component)
 
 DtGlStudioDrawable (const DtGlStudioDrawable &other, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual ~DtGlStudioDrawable ()
 
virtual osg::Object * cloneType () const
 
virtual osg::Object * clone (const osg::CopyOp &copyop) const
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const charlibraryName () const
 
virtual const charclassName () const
 
virtual bool loadLiveComponent (const std::string &fileName, const std::string &className)
 
virtual void destroyComponent ()
 
virtual void setComponent (disti::ComponentBase *comp)
 
virtual disti::ComponentBase * component ()
 
virtual bool handleMouseInput (const DtMouseEvent &ea)
 
virtual osg::BoundingBox computeBoundingBox () const
 
virtual bool supports (osg::PrimitiveFunctor &) const
 
virtual void accept (osg::PrimitiveFunctor &functor) const
 
virtual void update (unsigned int frameNumber)
 
virtual bool cull (osg::NodeVisitor *visitor, osg::Drawable *drawable, osg::State *state=NULL) const
 
virtual void drawImplementation (osg::RenderInfo &state) const
 
virtual void setProperty (const std::string &prop, const std::string &val)
 
virtual void setDe (DtDe *de)
 
virtual void setCockpitObject (DtOsgGlStudioCockpit *cockpitObject)
 
virtual void releaseGLObjects (osg::State *state=0) const
 
virtual void dirtyRenderObjects ()
 

Protected Member Functions

virtual void initQuadRendering (const osg::Camera *camera) const
 
virtual void deinitQuadRendering () const
 
virtual void initRTT (const osg::Camera *camera) const
 
virtual void deinitRTT () const
 
virtual void slot_reloadShaders ()
 
virtual float calculateHdrOutputScale (const osg::Camera *camera) const
 
virtual bool calculateSkyEnabled (const osg::Camera *camera) const
 

Protected Attributes

DtOsgGlStudioCockpitmyCockpitObject
 
disti::ComponentBase * myComponent
 
DtDemyDe
 
std::map< const osg::Camera
*, DtGlRenderTexture * > 
myGLRenderTextures
 
std::map< const osg::Camera
*, DtGlScreenQuad * > 
myGLScreenQuads
 
osg::ref_ptr< osg::Program > myProgram
 
std::vector< osg::Vec3 > myBoundingBoxVertices
 
DtSignalConnectionManager myConnections
 
unsigned int myLastUpdateFrameNumber
 

Constructor & Destructor Documentation

makVrv::DtGlStudioDrawable::DtGlStudioDrawable ( )

constructor

makVrv::DtGlStudioDrawable::DtGlStudioDrawable ( disti::ComponentBase *  component)

CTOR which takes a disti component. For loading user-instantiated (statically linked) component object.

makVrv::DtGlStudioDrawable::DtGlStudioDrawable ( const DtGlStudioDrawable other,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy. For loading from a live component DLL.

virtual makVrv::DtGlStudioDrawable::~DtGlStudioDrawable ( )
virtual

DTOR.

Member Function Documentation

virtual osg::Object* makVrv::DtGlStudioDrawable::cloneType ( ) const
virtual

Required osg::Object class methods.

virtual osg::Object* makVrv::DtGlStudioDrawable::clone ( const osg::CopyOp &  copyop) const
virtual
virtual bool makVrv::DtGlStudioDrawable::isSameKindAs ( const osg::Object *  obj) const
virtual
virtual const char* makVrv::DtGlStudioDrawable::libraryName ( ) const
virtual
virtual const char* makVrv::DtGlStudioDrawable::className ( ) const
virtual
virtual bool makVrv::DtGlStudioDrawable::loadLiveComponent ( const std::string &  fileName,
const std::string &  className 
)
virtual

Loads a live component from a GL Studio shared library.

virtual void makVrv::DtGlStudioDrawable::destroyComponent ( )
virtual

Frees the memory for the component.

virtual void makVrv::DtGlStudioDrawable::setComponent ( disti::ComponentBase *  comp)
virtual

Replace the currently loaded component with the given component instance. The node takes ownership of the object.

virtual disti::ComponentBase* makVrv::DtGlStudioDrawable::component ( )
virtual

Get access to the component pointer to allow for calling component-specific methods.

virtual bool makVrv::DtGlStudioDrawable::handleMouseInput ( const DtMouseEvent ea)
virtual

handle mouse events

virtual osg::BoundingBox makVrv::DtGlStudioDrawable::computeBoundingBox ( ) const
virtual

Computes the bounding box if needed.

virtual bool makVrv::DtGlStudioDrawable::supports ( osg::PrimitiveFunctor &  ) const
virtual

OSG required function.

virtual void makVrv::DtGlStudioDrawable::accept ( osg::PrimitiveFunctor &  functor) const
virtual

The PrimitiveFunctor is used for OpenSceneGraph picking The Drawable object should tell the PrimitiveFunctor about it's geometry. Since we are unable to get the detailed geometry here we use the bounding box geometry for osg picking. Detailed picking of component geometry is done within HandleInput.

virtual void makVrv::DtGlStudioDrawable::update ( unsigned int  frameNumber)
virtual

The update function is called each frame. This is where we call Calculate() on the component.

virtual bool makVrv::DtGlStudioDrawable::cull ( osg::NodeVisitor *  visitor,
osg::Drawable *  drawable,
osg::State *  state = NULL 
) const
virtual
virtual void makVrv::DtGlStudioDrawable::drawImplementation ( osg::RenderInfo &  state) const
virtual
virtual void makVrv::DtGlStudioDrawable::setProperty ( const std::string &  prop,
const std::string &  val 
)
virtual
virtual void makVrv::DtGlStudioDrawable::setDe ( DtDe de)
virtual
virtual void makVrv::DtGlStudioDrawable::setCockpitObject ( DtOsgGlStudioCockpit cockpitObject)
virtual
virtual void makVrv::DtGlStudioDrawable::releaseGLObjects ( osg::State *  state = 0) const
virtual
virtual void makVrv::DtGlStudioDrawable::dirtyRenderObjects ( )
virtual

used by the cockpit to let the drawable know that something changed with the rendering so rebuild the rtt shader and drawable.

virtual void makVrv::DtGlStudioDrawable::initQuadRendering ( const osg::Camera *  camera) const
protectedvirtual

initialize the geometry to render the RTT texture on top of the current framebuffer

virtual void makVrv::DtGlStudioDrawable::deinitQuadRendering ( ) const
protectedvirtual

tear down the geometry used to render the RTT texture

virtual void makVrv::DtGlStudioDrawable::initRTT ( const osg::Camera *  camera) const
protectedvirtual

setup the rtt for the texture that is used when HDR is turned on

virtual void makVrv::DtGlStudioDrawable::deinitRTT ( ) const
protectedvirtual

tear down the rtt for the HDR cockpit textue

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

slot for reload shaders signal so the cockpit RTT shader can be reloaded

virtual float makVrv::DtGlStudioDrawable::calculateHdrOutputScale ( const osg::Camera *  camera) const
protectedvirtual

get the hdr output scale to set up

virtual bool makVrv::DtGlStudioDrawable::calculateSkyEnabled ( const osg::Camera *  camera) const
protectedvirtual

get the sky enabled bool to set up

Member Data Documentation

DtOsgGlStudioCockpit* makVrv::DtGlStudioDrawable::myCockpitObject
protected
disti::ComponentBase* makVrv::DtGlStudioDrawable::myComponent
protected
DtDe* makVrv::DtGlStudioDrawable::myDe
protected
std::map<const osg::Camera *, DtGlRenderTexture*> makVrv::DtGlStudioDrawable::myGLRenderTextures
mutableprotected
std::map<const osg::Camera *, DtGlScreenQuad*> makVrv::DtGlStudioDrawable::myGLScreenQuads
mutableprotected
osg::ref_ptr<osg::Program> makVrv::DtGlStudioDrawable::myProgram
mutableprotected
std::vector<osg::Vec3> makVrv::DtGlStudioDrawable::myBoundingBoxVertices
mutableprotected
DtSignalConnectionManager makVrv::DtGlStudioDrawable::myConnections
protected
unsigned int makVrv::DtGlStudioDrawable::myLastUpdateFrameNumber
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)