an interface for controlling the camera using a mouse.
More...
#include <CameraController.hpp>
Inherited by ArcBallController, and FixedAxisController.
|
virtual | ~CameraController () |
| destructor
|
|
virtual void | setBounds (double NewWidth, double NewHeight)=0 |
| set the bounds that define the area where the 2d point is valid. The bound is defined in a plane with [0,width] and [0,height]. Where (0,0) is the upper left corner of the plane. More...
|
|
virtual void | setCenter (const rw::math::Vector3D<> ¢er, const rw::math::Vector2D<> &screenCenter)=0 |
| update the center of rotation and screen center More...
|
|
virtual void | handleEvent (QEvent *event)=0 |
| event handler, typically mouse and keyboard More...
|
|
virtual void | setTransform (const rw::math::Transform3D<> &t3d)=0 |
| set world to camera transformation More...
|
|
virtual rw::math::Transform3D | getTransform () const =0 |
| get the current world to camera transformation More...
|
|
virtual rw::math::Vector3D | getCenter ()=0 |
| get the current pivot point in world coordinates More...
|
|
virtual void | draw ()=0 |
| draw the camera control.
|
|
virtual void | zoom (double amount)=0 |
| Zoom by amount specified by amount. More...
|
|
virtual void | autoZoom (rw::core::Ptr< rw::models::WorkCell > workcell, rw::core::Ptr< const rw::kinematics::State > state, double fovy, double aspectRatio)=0 |
| Zooms the camera to fit all devices into the camera view. More...
|
|
virtual void | setZoomTarget (rw::math::Vector3D< double > target, bool enable=true) |
| set the 3D coordinate that should be zoomed towards. More...
|
|
virtual void | setPanTarget (rw::math::Vector3D< double > target, bool enable=true) |
| set the 3D coordinate that should be moved. More...
|
|
virtual rw::math::Vector3D | getPanTarget () |
| get the 3D coordinate that should be moved. More...
|
|
virtual void | setDrawable (rw::graphics::DrawableNode::Ptr obj) |
| add a drawable to the camera controller More...
|
|
an interface for controlling the camera using a mouse.
◆ autoZoom()
Zooms the camera to fit all devices into the camera view.
Useful when working with robots smaller or larger than standard. Calling this method moves the camera along its Z-axis.
- Parameters
-
workcell | [in] The autozoom functions fits all frames of workcell in the viewport |
state | [in] state with the current positions of the frames. If NULL, the default workcell state is used. |
fovy | [in] the field of view in the vertical direction (in radians). |
aspectRatio | [in] the aspect ratio of (width divided by height). |
Implemented in ArcBallController.
◆ getCenter()
◆ getPanTarget()
get the 3D coordinate that should be moved.
- Returns
- the target position to move.
Reimplemented in ArcBallController.
◆ getTransform()
◆ handleEvent()
virtual void handleEvent |
( |
QEvent * |
event | ) |
|
|
pure virtual |
◆ setBounds()
virtual void setBounds |
( |
double |
NewWidth, |
|
|
double |
NewHeight |
|
) |
| |
|
pure virtual |
set the bounds that define the area where the 2d point is valid. The bound is defined in a plane with [0,width] and [0,height]. Where (0,0) is the upper left corner of the plane.
- Parameters
-
NewWidth | [in] width |
NewHeight | [in] height |
Implemented in ArcBallController.
◆ setCenter()
update the center of rotation and screen center
- Parameters
-
center | [in] center of rotation in world coordinates |
screenCenter | [in] center of rotation in screen coordinates |
Implemented in FixedAxisController, and ArcBallController.
◆ setDrawable()
add a drawable to the camera controller
- Parameters
-
obj | [in] a drawable to be controled by the camera controller |
Reimplemented in ArcBallController.
◆ setPanTarget()
set the 3D coordinate that should be moved.
- Parameters
-
target | [in] the target position to move. |
enable | [in] enable or disable pan with pantarget. |
Reimplemented in ArcBallController.
◆ setTransform()
◆ setZoomTarget()
set the 3D coordinate that should be zoomed towards.
- Parameters
-
target | [in] the target position to zoom towards. |
enable | [in] enable or disable zoom with zoomtarget. |
Reimplemented in ArcBallController.
◆ zoom()
virtual void zoom |
( |
double |
amount | ) |
|
|
pure virtual |
Zoom by amount specified by amount.
Calling this method moves the camera along its Z-axis.
- Parameters
-
amount | [in] Meters to zoom the camera |
Implemented in ArcBallController.
The documentation for this class was generated from the following file: