|
ADTF Display Toolbox
|
Base mixin for handling cBaseObjectScene s. More...
#include <baseobjectmixin.h>
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 |
Base mixin for handling cBaseObjectScene s.
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.
|
inline |
Constructor.
Definition at line 42 of file baseobjectmixin.h.
|
inlineoverride |
Destructor.
Definition at line 49 of file baseobjectmixin.h.
|
inlinevirtual |
Adds a new object scene.
Call this only after cMixin::InitScene has been called.
| pReader | [in] The reader that the scene is assigned to. |
| pScene | [in] The new scene. |
Definition at line 60 of file baseobjectmixin.h.
References cMixin::GetRoot(), and m_oScenes.
|
inlinevirtual |
Returns the scene which is assigned to a specific pin.
| pReader | [in] The reader of which the scene should be retreived |
| ppScene | [out] A pointer that will be set to point to the scene. |
Definition at line 80 of file baseobjectmixin.h.
References m_oScenes.
|
protectedpure virtual |
Updates the scene with data from a new media sample.
Implement this to fill and update the scene with your own data.
| pScene | [in] The scene that should be updated. |
| pSample | [in] The received media sample |
References cBaseObject::IsSelected(), and cBaseObject::SetSelected().
|
protected |
Handles searching for a corresponding cBaseObject OnObjectPick.
Definition at line 164 of file baseobjectmixin.h.
Referenced by AddScene(), and GetScene().