13#include "adtfstreaming3/samplereader.h"
62 auto oScene =
m_oScenes.find(pSampleReader);
65 RETURN_ERROR_DESC(ERR_DEVICE_IN_USE,
"The scene was already registered");
82 auto oScene =
m_oScenes.find(pSampleReader);
85 RETURN_ERROR(ERR_NOT_FOUND);
88 *ppScene = oScene->second;
94 tResult ProcessInput(adtf::streaming::flash::ISampleReader* pReader,
95 const adtf::ucom::ant::iobject_ptr<const adtf::streaming::ant::ISample>& pSample)
override
98 if (IS_OK(
GetScene(pReader, &pScene)))
106 tResult
OnPick(tInt32 nPosX, tInt32 nPosY, tUInt32 nFlags,
const tNodePath& sNodePath)
override
109 const cBaseObjectScene* pScene =
nullptr;
111 for (tSize nIndex = 0; nIndex < sNodePath.nCount; ++nIndex)
113 auto pNode = sNodePath.ppNodePath[nIndex];
117 pScene =
dynamic_cast<const cBaseObjectScene*
>(pNode);
121 auto pObj =
dynamic_cast<const cBaseObject*
>(pNode);
126 RETURN_IF_FAILED(OnObjectPick(
const_cast<cBaseObjectScene*
>(pScene),
const_cast<cBaseObject*
>(pObj),
127 nPosX, nPosY, nFlags, sNodePath));
145 const adtf::ucom::ant::iobject_ptr<const adtf::streaming::ant::ISample>& pSample) = 0;
164 std::map<adtf::streaming::ISampleReader*, osg::ref_ptr<cBaseObjectScene>>
m_oScenes;
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
cBaseObjectMixin()
Constructor.
Base class for objects that can be managed with cBaseObjectScene.
virtual tBool IsSelected()
Returns the selected property of the object.
virtual tResult SetSelected(tBool bSelected)
Gives the object a chance to change its appearance when being selected or unselected.
Base mixin for handling cBaseObjectScene s.
~cBaseObjectMixin() override
Destructor.
std::map< adtf::streaming::ISampleReader *, osg::ref_ptr< cBaseObjectScene > > m_oScenes
Handles searching for a corresponding cBaseObject OnObjectPick.
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.
cBaseObjectMixin()
Constructor.
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.
Base class for managing a scene of objects.
virtual tResult OnPick(tInt32, tInt32, tUInt32, const tNodePath &)
Handle a left click on one of your nodes.
osg::Group * GetRoot()
Add your nodes to this group.
Copyright © Audi Electronics Venture GmbH.
Namespace for functionality provided by the Mixin Library.
Namespace for functionality provided by the Display Toolbox.