Go to the documentation of this file.
34 #include <OgreCamera.h>
35 #include <OgreSceneManager.h>
36 #include <OgreSceneNode.h>
56 : context_(nullptr), camera_(nullptr), is_active_(false), type_property_(nullptr)
60 "Anything closer to the camera than this threshold will not get rendered.",
this,
66 "Render the main view in stereo if supported."
67 " On Linux this requires a recent version of Ogre and"
68 " an NVIDIA Quadro card with 3DVision glasses.",
71 "Swap eyes if the monitor shows the left eye on the right.",
74 new FloatProperty(
"Stereo Eye Separation", 0.06
f,
"Distance between eyes for stereo rendering.",
78 "Distance from eyes to screen. For stereo rendering.",
stereo_enable_,
81 new BoolProperty(
"Invert Z Axis",
false,
"Invert camera's Z axis for Z-down environments/models.",
91 ss <<
"ViewControllerCamera" << count++;
128 QStringList id_parts = class_id.split(
"/");
129 if (id_parts.size() != 2)
138 return id_parts[1] +
" (" + id_parts[0] +
")";
144 if (role == Qt::ForegroundRole)
189 if (
config.mapGetString(
"Name", &name))
209 QPoint mouse_rel_panel = panel->mapFromGlobal(QCursor::pos());
210 Ogre::Vector3 point_rel_world;
212 mouse_rel_panel.y(), point_rel_world))
218 if (event->key() == Qt::Key_Z)
231 Ogre::Vector3 point(x, y, z);
246 camera_->setNearClipDistance(n);
256 camera_->setFrustumOffset(0.5
f * eye_sep, 0.0
f);
257 camera_->setFocalLength(focal_dist);
virtual bool getBool() const
void load(const Config &config) override
Load the value of this property and/or its children from the given Config reference.
QCursor getDefaultCursor(bool)
virtual void onInitialize()
Do subclass-specific initialization. Called by ViewController::initialize after context_ and camera_ ...
virtual void setName(const QString &name)
Set the name.
static RenderSystem * get()
virtual void onActivate()
called by activate().
FloatProperty * near_clip_property_
virtual QVariant getViewData(int column, int role) const
Return data appropriate for the given column (0 or 1) and role for this Property.
void show()
Show this Property in any PropertyTreeWidgets.
Property specialized to provide getter for booleans.
QCursor makeIconCursor(const QString &url, bool fill_cache)
virtual Ogre::SceneManager * getSceneManager() const =0
Returns the Ogre::SceneManager used for the main RenderPanel.
DisplayContext * context_
BoolProperty * stereo_enable_
virtual void handleKeyEvent(QKeyEvent *event, RenderPanel *panel)
Called by MoveTool and InteractionTool when keyboard events are passed to them.
bool get3DPoint(Ogre::Viewport *viewport, const int x, const int y, Ogre::Vector3 &result_point)
Property specialized to enforce floating point max/min.
void hide()
Hide this Property in any PropertyTreeWidgets.
void updateStereoProperties()
void activate()
Called by RenderPanel when this view controller is about to be used.
virtual float getFloat() const
virtual void setStatus(const QString &message)=0
virtual bool setValue(const QVariant &new_value)
Set the new value for this property. Returns true if the new value is different from the old value,...
QMap< CursorType, QCursor > standard_cursors_
void initialize(DisplayContext *context)
Do all setup that can't be done in the constructor.
Pure-virtual base class for objects which give Display subclasses context in which to work.
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Property.
virtual QString getName() const
Return the name of this Property as a QString.
QVariant getViewData(int column, int role) const override
Overridden from Property to give a different background color and bold font if this view is active.
void save(Config config) const override
Write the value of this property and/or its children into the given Config reference.
virtual void setReadOnly(bool read_only)
Prevent or allow users to edit this property from a PropertyTreeWidget.
void emitConfigChanged()
Subclasses should call this whenever a change is made which would change the results of toString().
Qt::ItemFlags getViewFlags(int column) const override
Overridden from Property to make this draggable if it is not active.
~ViewController() override
FloatProperty * stereo_focal_distance_
static QString formatClassId(const QString &class_id)
virtual void save(Config config) const
Write the value of this property and/or its children into the given Config reference.
virtual SelectionManager * getSelectionManager() const =0
Return a pointer to the SelectionManager.
void setCursor(CursorType cursor_type)
void lookAt(float x, float y, float z)
Convenience function which calls lookAt(Ogre::Vector3).
FloatProperty * stereo_eye_separation_
virtual QString getClassId() const
Return the class identifier which was used to create this instance. This version just returns whateve...
Ogre::Viewport * getViewport() const
void setStatus(const QString &message)
virtual void load(const Config &config)
Load the value of this property and/or its children from the given Config reference.
BoolProperty * stereo_eye_swap_
Configuration data storage class.
void updateNearClipDistance()
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:10