47 #ifndef _MIRA_VISUALIZATION3DBASIC_H_ 48 #define _MIRA_VISUALIZATION3DBASIC_H_ 51 #include <OGRE/OgreSceneManager.h> 52 #include <OGRE/OgreSceneNode.h> 97 template <
typename Reflector>
101 "The channel to be visualized");
108 mNode = mgr->getRootSceneNode()->createChildSceneNode();
118 virtual void setupScene(Ogre::SceneManager* mgr, Ogre::SceneNode* node) = 0;
130 mNode->setVisible(enabled);
147 "Data has no frame for transforming it into the view's camera frame");
151 d =
getAuthority().template getTransform<RigidTransform3f>(
157 d =
getAuthority().template getTransform<RigidTransform3f>(
Time mDataTimestamp
Definition: Visualization3DBasic.h:204
The interface of a Visualization3DSite.
Definition: Visualization3D.h:84
void setName(const std::string &name)
Sets the name of this visualization.
Definition: Visualization.h:157
virtual Authority & getAuthority()
Return the authority as reference.
virtual void setupScene(IVisualization3DSite *site)
Must be implemented in derived classes.
Definition: Visualization3DBasic.h:106
std::string mChannelDisplayName
Definition: Visualization3DBasic.h:201
virtual void dataChanged(ChannelRead< T > data)
Overwrite this method to listen on channel callbacks.
Definition: Visualization3DBasic.h:189
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
virtual void onDataChanged(ChannelRead< T > data)
Definition: Visualization3DBasic.h:196
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
void channelProperty(Reflector &r, const std::string &name, ChannelProperty< T > &channel, const std::string &comment, OptionalMode optional=REQUIRED)
Special property-method that should be called within the reflect method to specify a ChannelProperty...
Definition: Visualization.h:249
virtual Ogre::SceneNode * getNode()
Must be implemented in derived classes to return the scene node to which this visualization attaches ...
Definition: Visualization3DBasic.h:120
Declaration of helper functions for converting from and to Ogre.
ChannelProperty< T > mDataChannel
Definition: Visualization3DBasic.h:200
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:494
bool isEnabled() const
Returns true, if this visualization is enabled and visible.
Definition: Visualization.h:140
#define MIRA_THROW(ex, msg)
Macro for throwing an exception.
Definition: Exception.h:82
The data structure that is returned by getDataConnection.
Definition: Visualization.h:183
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:418
Declaration of Visualization3D and related classes.
virtual void channelChanged()
Overwrite this method to get notified when the connected channel changes.
Definition: Visualization3DBasic.h:184
Use this class to represent time durations.
Definition: Time.h:106
void reflect(Reflector &r)
Definition: Visualization3DBasic.h:98
virtual void setEnabled(bool enabled)
Changes the enabled-state and therefore the visibility of this visualization.
Definition: Visualization.h:149
virtual ~Visualization3DBasic()
Definition: Visualization3DBasic.h:91
Visualization3DBasic(const std::string channelDisplayName="Channel")
Constructor taking a name of the visualized channel.
Definition: Visualization3DBasic.h:82
std::string mDataFrameID
Definition: Visualization3DBasic.h:203
void dataChangedCallback(ChannelRead< T > data)
Definition: Visualization3DBasic.h:166
Base class for exceptions.
Definition: Exception.h:199
The concrete typed ChannelProperty template class.
Definition: ChannelProperty.h:214
static Time now() static Time eternity()
Returns the current utc based time.
Definition: Time.h:481
Abstract base class for all 3D visualization that are used by Visualization3DView.
Definition: Visualization3D.h:169
Inherit from this class if you want to implement a simple 3D visualization.
Definition: Visualization3DBasic.h:75
virtual Ogre::SceneManager * getSceneManager()=0
Ogre::SceneNode * mNode
Definition: Visualization3DBasic.h:206
void channelChangedCallback()
Definition: Visualization3DBasic.h:172
virtual DataConnection getDataConnection()
Returns information about the direct data connection for this visualization.
Definition: Visualization3DBasic.h:135
void setEnabled(bool enabled)
Changes the enabled-state and therefore the visibility of this visualization.
Definition: Visualization3DBasic.h:127
virtual void update(Duration dt)
This method can be implemented in the derived Visualization classes.
Definition: Visualization3DBasic.h:141
virtual IVisualization3DSite * getSite()
Returns a pointer to the IVisualization3DSite interface that was set in the init() method...
MIRA_GUI_WIDGETS_EXPORT void setTransform(Ogre::SceneNode *node, const RigidTransform2f &t)
Sets position and orientation of the scene node according to the specified transform.