ADTF Display Toolbox
Loading...
Searching...
No Matches
cBaseObjectMixinabstract

Base mixin for handling cBaseObjectScene s. More...

#include <baseobjectmixin.h>

Inheritance diagram for cBaseObjectMixin:
[legend]

Public Member Functions

 cBaseObjectMixin ()
 Constructor.
 
 ~cBaseObjectMixin () override
 Destructor.
 
virtual tResult AddScene (adtf::streaming::flash::ISampleReader *pSampleReader, cBaseObjectScene *pScene)
 Adds a new object scene.
 
virtual tResult GetScene (adtf::streaming::flash::ISampleReader *pSampleReader, cBaseObjectScene **ppScene)
 Returns the scene which is assigned to a specific pin.
 
- Public Member Functions inherited from cMixin
 cMixin ()
 Constructor.
 
 ~cMixin () override
 Destructor.
 
IChildCoordinateSystem * CreateCoordinateSystem (const tChar *strName)
 Creates a new coordinate system.
 
osg::Group * GetRoot ()
 Add your nodes to this group.
 
ISceneGraph & GetSceneGraph ()
 Access the ISceneGraph interface.
 
osgText::Font * GetFont ()
 Returns a pointer to a valid Font, use this for your osgText nodes.
 
virtual tResult OnPick (tInt32, tInt32, tUInt32, const tNodePath &)
 Handle a left click on one of your nodes.
 
virtual tResult AddMenuItemForPick (chewbacca::IMenu &, const tNodePath &)
 Return context menu entries for one of your nodes.
 
virtual tResult AddGlobalMenuItem (chewbacca::IMenu &)
 Add global menu entries not related to a specific one of your nodes.
 
std::vector< const osg::Node * > GetLastMenuPath ()
 

Protected Member Functions

virtual tResult UpdateScene (cBaseObjectScene *pScene, const adtf::ucom::ant::iobject_ptr< const adtf::streaming::ant::ISample > &pSample)=0
 Updates the scene with data from a new media sample.
 
- Protected Member Functions inherited from cMixin
virtual tResult InitScene ()
 Impelement this to add your graph elements.
 
virtual tVoid ClearScene ()
 Use this to clean up your graph elements.
 
tVoid CreateCoordinateSystems ()
 

Protected Attributes

std::map< adtf::streaming::ISampleReader *, osg::ref_ptr< cBaseObjectScene > > m_oScenes
 Handles searching for a corresponding cBaseObject OnObjectPick.
 
- Protected Attributes inherited from cMixin
osg::ref_ptr< osg::Switch > m_pRootNode
 
filter::interface_client< ISceneGraph > m_pSceneGraph
 
std::vector< ucom::object_ptr< detail::cSceneGraphProxy > > m_oCoordinateSystemSceneGraphProxys
 
osg::ref_ptr< osgText::Font > m_pFont = new cInstanceFont
 
ucom::object_ptr< IViewer > m_pViewer
 
std::vector< const osg::Node * > m_oLastPick
 

Detailed Description

Base mixin for handling cBaseObjectScene s.

Bring newest version of base class into scope.

Subclass to create a mixin which handles multiple cBaseObjectScene. Use AddScene to add a new scene object in your InitScene method. In your UpdateScene you can then use the cBaseObjectScene interface to add, remove or manipulate objects.

Definition at line 36 of file baseobjectmixin.h.

Constructor & Destructor Documentation

◆ cBaseObjectMixin()

cBaseObjectMixin ( )
inline

Constructor.

Definition at line 42 of file baseobjectmixin.h.

◆ ~cBaseObjectMixin()

~cBaseObjectMixin ( )
inlineoverride

Destructor.

Definition at line 49 of file baseobjectmixin.h.

Member Function Documentation

◆ AddScene()

virtual tResult AddScene ( adtf::streaming::flash::ISampleReader * pSampleReader,
cBaseObjectScene * pScene )
inlinevirtual

Adds a new object scene.

Call this only after cMixin::InitScene has been called.

Parameters
pReader[in] The reader that the scene is assigned to.
pScene[in] The new scene.
Returns
Standard result.

Definition at line 60 of file baseobjectmixin.h.

◆ GetScene()

virtual tResult GetScene ( adtf::streaming::flash::ISampleReader * pSampleReader,
cBaseObjectScene ** ppScene )
inlinevirtual

Returns the scene which is assigned to a specific pin.

Parameters
pReader[in] The reader of which the scene should be retreived
ppScene[out] A pointer that will be set to point to the scene.
Returns
Standard result.

Definition at line 80 of file baseobjectmixin.h.

◆ UpdateScene()

virtual tResult UpdateScene ( cBaseObjectScene * pScene,
const adtf::ucom::ant::iobject_ptr< const adtf::streaming::ant::ISample > & pSample )
protectedpure virtual

Updates the scene with data from a new media sample.

Implement this to fill and update the scene with your own data.

Parameters
pScene[in] The scene that should be updated.
pSample[in] The received media sample
Returns
Standard result.

Member Data Documentation

◆ m_oScenes

std::map<adtf::streaming::ISampleReader*, osg::ref_ptr<cBaseObjectScene> > m_oScenes
protected

Handles searching for a corresponding cBaseObject OnObjectPick.

Definition at line 164 of file baseobjectmixin.h.