ADTF_DISPLAY_TOOLBOX
3.8.0 (ADTF 3.14.3)
|
Base class for Mixin Filters. More...
Public Member Functions | |
cMixin () | |
Constructor. | |
~cMixin () override | |
Destructor. | |
IChildCoordinateSystem * | CreateCoordinateSystem (const tChar *strName) |
Creates a new coordinate system. More... | |
osg::Group * | GetRoot () |
Add your nodes to this group. More... | |
ISceneGraph & | GetSceneGraph () |
Access the ISceneGraph interface. More... | |
osgText::Font * | GetFont () |
Returns a pointer to a valid Font, use this for your osgText nodes. More... | |
virtual tResult | OnPick (tInt32 nPosX, tInt32 nPosY, tUInt32 nFlags, const tNodePath &sNodePath) |
Handle a left click on one of your nodes. More... | |
virtual tResult | AddMenuItemForPick (IMenu &oMenu, const tNodePath &sNodePath) |
Return context menu entries for one of your nodes. More... | |
virtual tResult | AddGlobalMenuItem (IMenu &oMenu) |
Add global menu entries not related to a specific one of your nodes. More... | |
std::vector< const osg::Node * > | GetLastMenuPath () |
Protected Member Functions | |
virtual tResult | InitScene () |
Impelement this to add your graph elements. More... | |
virtual tVoid | ClearScene () |
Use this to clean up your graph elements. | |
Protected Attributes | |
std::unique_ptr< cImplementation > | m_pImplementation |
D-Pointer implementation. | |
Base class for Mixin Filters.
Use all the basic functionality available from adtf::filter::flash::cFilter.
Create your part of the scene graph by overriding InitScene() and adding nodes to GetRoot().
The overridden Process() and ProcessInput() methods will lock the viewer for you, so you can manipulate your graph elements without any special care in the ProcessInput(streaming::flash::ISampleReader*, const ucom::ant::iobject_ptr<const streaming::ant::ISample>&) method.
If you need to manipulate the tree in other locations, please use IViewer::Lock() / IViewer::Unlock().
|
virtual |
Add global menu entries not related to a specific one of your nodes.
oMenu | [in] The menu you should add your entries to. |
Return context menu entries for one of your nodes.
oMenu | [in] The menu you should add your entries to. |
sNodePath | [in] The path in the tree from the root node to the clicked node. |
IChildCoordinateSystem* CreateCoordinateSystem | ( | const tChar * | strName | ) |
Creates a new coordinate system.
This will create an Interface Server where other Mixins can be connected to. All their nodes will reside within the new coordinate system.
[in] | strName | The name of the coordinate system and the Interface Server Pin. |
osgText::Font* GetFont | ( | ) |
Returns a pointer to a valid Font, use this for your osgText nodes.
Only avaliable after cMixin::InitScene has been called.
std::vector<const osg::Node*> GetLastMenuPath | ( | ) |
osg::Group* GetRoot | ( | ) |
Add your nodes to this group.
This node is placed within the parent coordinate system of the Mixin.
ISceneGraph& GetSceneGraph | ( | ) |
Access the ISceneGraph interface.
|
protectedvirtual |
Impelement this to add your graph elements.
|
virtual |
Handle a left click on one of your nodes.
This is called whenever the user left clicks on one of your nodes of the scene graph.
nPosX | [in] The horizontal position of the click in the view window. |
nPosY | [in] The vertical position of the click in the view window. |
nFlags | [in] Modifier keys, mouse buttons etc. (The current osg based implementation uses enums from tModifiers ) |
sNodePath | [in] The path in the tree from the root node to the clicked node. |