47 #ifndef _MIRA_VISUALIZATION3DVIEW_H_ 48 #define _MIRA_VISUALIZATION3DVIEW_H_ 72 (
"Description",
"3D view for channel data")
73 (
"Category" ,
"Visualization")
74 (
"Visualization",
"mira::Visualization3D"))
91 template <
typename Reflector>
95 r.property(
"Camera Mode", mCameraMode,
96 setter(&Visualization3DView::setCameraMode,
this),
97 "The view mode of the camera", PERSPECTIVE,
100 r.property(
"Camera", mCameraSettings,
"Camera view", Camera());
102 r.property(
"Background", mBackgroundMode,
setter(&Visualization3DView::setBackgroundMode,
this),
"Background mode", BACKGROUND_GRADIENT,
104 r.property(
"Background Color", mBackgroundColor1,
setter(&Visualization3DView::setBackgroundColor1,
this),
"Solid background color / Top gradient color", Ogre::ColourValue(0.78f,0.86f,1.0f) );
105 r.property(
"Background Gradient Color", mBackgroundColor2,
setter(&Visualization3DView::setBackgroundColor2,
this),
"Bottom gradient color", Ogre::ColourValue(0.90f,0.94f,1.0f) );
107 r.property(
"Render Mode", mRenderMode,
108 setter(&Visualization3DView::setRenderMode,
this),
109 "The view mode of the camera", NORMAL,
112 r.property(
"Stereo Mode", mStereoMode,
113 setter(&Visualization3DView::setStereoMode,
this),
114 "The view mode of the camera", NONE,
116 r.property(
"Stereo Eye Distance", mStereoEyeDistance,
"in meter, >0 for cross view, <0 for parallel view", 0.2f);
118 r.property(
"Show Bounding Boxes", mShowBoundingBoxes,
setter(&Visualization3DView::showBoundingBoxes,
this),
"Show bounding boxes of all objects (for debugging)",
false);
125 r.property(
"SaveContentMinPictureSize", mSaveContentMinPictureSize,
126 "Minimum width or height of the image saved by rendering the viewport at an appropriate resolution.", 2048);
181 virtual void setCamera(
const Camera& camera);
183 virtual Ogre::Camera*
acquireCamera(boost::function<
void()> lostCameraCallback = boost::function<
void()>());
199 void setupVisualizations();
205 void populateDefaultVisualizations();
206 void createDefaultVisualization(
const std::string& className,
const std::string& displayName);
237 void setCameraMode(CameraMode mode);
239 void setBackgroundMode(BackgroundMode mode);
240 void setBackgroundColor1(Ogre::ColourValue color);
241 void setBackgroundColor2(Ogre::ColourValue color);
242 void showBoundingBoxes(
bool show=
true);
244 void setRenderMode(RenderMode mode);
245 void setStereoMode(StereoMode mode);
249 ChannelProperty<float> mIntrinsicParamsChannel;
251 CameraMode mCameraMode;
252 Camera mCameraSettings;
254 bool mCameraAcquired;
255 boost::function<void()> mLostCameraCallback;
257 BackgroundMode mBackgroundMode;
258 Ogre::ColourValue mBackgroundColor1;
259 Ogre::ColourValue mBackgroundColor2;
261 RenderMode mRenderMode;
262 StereoMode mStereoMode;
263 float mStereoEyeDistance;
265 bool mShowBoundingBoxes;
267 Ogre::ColourValue mLightColor;
271 boost::mutex mListenerMutex;
272 std::set<InteractionListener3D*> mListeners;
274 uint mSaveContentMinPictureSize;
virtual void moveDownVisualization(Visualization *vis)
Change order of visualizations in the view, move the specified visualization down.
The interface of a Visualization3DSite.
Definition: Visualization3D.h:84
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Abstract base class for all derived visualizations, namely Visualization3D and Visualization2D.
Definition: Visualization.h:88
virtual std::set< InteractionListener3D * > getInteractionListeners()
Provides a special setter, that simply sets the value of the member to the given value AND calls a us...
friend class RenderQueueSorter
Definition: Visualization3DView.h:197
PropertyHint enumeration(const std::string &values)
Sets the attribute "enumeration".
Definition: PropertyHint.h:306
Class for 2D, 3D and N-dimensional points.
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
virtual void registerInteractionListener(InteractionListener3D *listener)
Class object which supports some kind of class reflection.
Definition: Class.h:97
Setter< T > setter(void(*f)(const T &))
Creates a Setter for global or static class methods taking the argument by const reference.
Definition: GetterSetter.h:443
virtual QImage captureContent()
Returns the content of the editor part as QImage.
const RGB White(1.0f, 1.0f, 1.0f)
void destroyVisualizations()
virtual const std::string & getFixedFrame() const
Definition: Visualization3DView.h:170
virtual void setCamera(const Camera &camera)
void reflect(Reflector &r)
Definition: Visualization3DView.h:92
virtual Ogre::Camera * acquireCamera(boost::function< void()> lostCameraCallback=boost::function< void()>())
Requests the camera of the visualization site.
Declaration of Visualization3D and related classes.
virtual const Camera & getCamera() const
Obtains the current camera settings (position, orientation, etc.) of the views own camera...
void changeAmbientLight()
PropertyHint limits(const T &min, const T &max)
Sets both attributes "minimum" and "maximum" to the specified values.
Definition: PropertyHint.h:275
#define MIRA_META_OBJECT(classIdentifier, MetaInfo)
Use this MACRO instead of MIRA_OBJECT if you like to add meta information to your class...
Definition: FactoryMacros.h:204
virtual void setCameraFrame(const TransformProperty &frame)
Use this class to represent time durations.
Definition: Time.h:106
virtual void update(Duration dt)
Is called by this class within the update timer event to update the view.
virtual const std::string & getCameraFrame() const
Definition: Visualization3DView.h:174
friend class RenderModeTechniqueMod
Definition: Visualization3DView.h:196
virtual const Class & supportedVisualizationToolClass() const
Derived visualization views may return the base class of their supported tools.
virtual void addVisualization(Visualization *vis)
Adds an existing visualization to this view.
Listener for mouse events on movable objects in a 3D view.
Definition: InteractionListener3D.h:66
PropertyHint minimum(const T &min)
Sets the attribute "minimum" to the specified value.
Definition: PropertyHint.h:243
virtual void moveUpVisualization(Visualization *vis)
Change order of visualizations in the view, move the specified visualization up.
Setter< T > setterNotify(T &member, boost::function< void()> notifyFn)
Creates a setter that simply sets the value of the specified member to the given value AND calls a us...
Definition: SetterNotify.h:86
PropertyHint step(const T &step)
Sets the attribute "step" to the specified value.
Definition: PropertyHint.h:265
virtual void removeInteractionListener(InteractionListener3D *listener)
Non intrusive reflect for OGRE color class.
virtual void releaseCamera()
Releases a camera that previously was acquired.
virtual QWidget * createVisualizationPart()
Declaration of VisualizationView and VisualizationViewTransformable.
virtual void changeLightDirection()
3D view of a scene that may contain different visualization objects which show the actual content of ...
Definition: Visualization3DView.h:68
virtual const Class & supportedVisualizationClass() const
Derived visualization views must return the base class of their supported visualizations.
virtual Ogre::SceneManager * getSceneManager()
friend class UI
Definition: Visualization3DView.h:192
virtual void saveContentToFile()
virtual void addTool(VisualizationTool *tool)
Adds an existing tool to this view.