RobWorkProject  23.9.11-
Public Member Functions | List of all members
FixedAxisController Class Reference

the FixedAxis Camera Controller is used to control the camera position and orientation in relation to a pivot point where the rotations generated are around the fixed axis of the world. More...

#include <FixedAxisController.hpp>

Inherits CameraController.

Public Member Functions

 FixedAxisController (GLfloat NewWidth, GLfloat NewHeight)
 constructor
 
virtual ~FixedAxisController ()
 destructor
 
void setBounds (GLfloat NewWidth, GLfloat NewHeight)
 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...
 
void setCenter (const rw::math::Vector3D<> &center, const rw::math::Vector2D<> &screenCenter)
 update the center of rotation and screen center More...
 
rw::math::Vector3D getCenter ()
 get the current pivot point in world coordinates More...
 
void draw ()
 draw the camera control. More...
 
virtual void handleEvent (QEvent *event)
 event handler, typically mouse and keyboard More...
 
rw::math::Transform3D getTransform () const
 get the current world to camera transformation More...
 
void setTransform (const rw::math::Transform3D<> &t3d)
 set world to camera transformation More...
 
- Public Member Functions inherited from CameraController
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 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...
 

Additional Inherited Members

- Public Types inherited from CameraController
typedef rw::core::Ptr< CameraControllerPtr
 smart pointer type of this class
 

Detailed Description

the FixedAxis Camera Controller is used to control the camera position and orientation in relation to a pivot point where the rotations generated are around the fixed axis of the world.

More specifically the horizontal mouse drag rotates the scene around the world z-axis whereas the vertical drag movements rotate the scene around the camera y-axis located in the pivot point.

Member Function Documentation

◆ draw()

void draw ( )
virtual

draw the camera control.

Implements CameraController.

◆ getCenter()

rw::math::Vector3D getCenter ( )
inlinevirtual

get the current pivot point in world coordinates

Returns
current pivot point

Implements CameraController.

◆ getTransform()

rw::math::Transform3D getTransform ( ) const
virtual

get the current world to camera transformation

Returns
world to camera transformation

Implements CameraController.

◆ handleEvent()

virtual void handleEvent ( QEvent *  event)
virtual

event handler, typically mouse and keyboard

Parameters
event[in] the specific event

Implements CameraController.

◆ setBounds()

void setBounds ( GLfloat  NewWidth,
GLfloat  NewHeight 
)

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

◆ setCenter()

void setCenter ( const rw::math::Vector3D<> &  center,
const rw::math::Vector2D<> &  screenCenter 
)
virtual

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

Implements CameraController.

◆ setTransform()

void setTransform ( const rw::math::Transform3D<> &  t3d)
virtual

set world to camera transformation

Parameters
t3d[in] world to camera transformation

Implements CameraController.


The documentation for this class was generated from the following file: