Easy3D 2.5.3
|
A manipulated frame with camera specific mouse bindings. More...
#include <easy3d/renderer/manipulated_camera_frame.h>
Frame manipulation | |
class | Camera |
class | Viewer |
void | action_rotate (int mouse_x, int mouse_y, int mouse_dx, int mouse_dy, Camera *camera, ScreenAxis axis) override |
void | action_translate (int mouse_x, int mouse_y, int mouse_dx, int mouse_dy, Camera *camera, ScreenAxis axis) override |
void | action_zoom (int dy_wheel, Camera *camera) override |
virtual void | action_turn (float angle_radian, Camera *camera) |
Additional Inherited Members | |
Public Types inherited from ManipulatedFrame | |
enum | ScreenAxis { NONE , HORIZONTAL , VERTICAL , ORTHOGONAL } |
Public Attributes inherited from Frame | |
Signal | modified |
A manipulated frame with camera specific mouse bindings.
A ManipulatedCameraFrame is a specialization of a ManipulatedFrame, designed to be set as the Camera::frame(). Mouse motions are basically interpreted in a negated way: when the mouse goes to the right, the ManipulatedFrame translation goes to the right, while the ManipulatedCameraFrame has to go to the left, so that the scene seems to move to the right.
A ManipulatedCameraFrame rotates around its pivotPoint(), which corresponds to the associated Camera::pivotPoint().
A ManipulatedCameraFrame can also "fly" in the scene. It basically moves forward, and turns according to the mouse motion. See flySpeed(), sceneUpVector() and the QGLViewer::MOVE_FORWARD and QGLViewer::MOVE_BACKWARD QGLViewer::MouseAction.
See the mouse page for a description of the possible actions that can be performed using the mouse and their bindings.
|
overridedefault |
Virtual destructor. Empty.
ManipulatedCameraFrame | ( | const ManipulatedCameraFrame & | mcf | ) |
Copy constructor. Performs a deep copy of all members using operator=().
|
overridevirtual |
Modifies the ManipulatedFrame according to the mouse motion.
Actual behavior depends on mouse bindings. See the QGLViewer::MouseAction enum and the QGLViewer mouse page for details.
The camera
is used to fit the mouse motion with the display parameters (see Camera::screenWidth(), Camera::screenHeight(), Camera::fieldOfView()).
Emits the manipulated() signal.
Reimplemented from ManipulatedFrame.
|
overridevirtual |
Reimplemented from ManipulatedFrame.
|
overridevirtual |
Reimplemented from ManipulatedFrame.
ManipulatedCameraFrame & operator= | ( | const ManipulatedCameraFrame & | mcf | ) |
Equal operator. Calls ManipulatedFrame::operator=() and then copy attributes.
|
inline |
Returns the point the ManipulatedCameraFrame pivot point, around which the camera rotates.
It is defined in the world coordinate system. Default value is (0,0,0).
When the ManipulatedCameraFrame is associated to a Camera, Camera::pivotPoint() also returns this value. This point can interactively be changed using the mouse (see Camera::setPivotPointFromPixel() and QGLViewer::RAP_FROM_PIXEL and QGLViewer::RAP_IS_CENTER in the mouse page).
|
inline |
Sets the pivotPoint(), defined in the world coordinate system.
|
inline |
Sets the value of zoomsOnPivotPoint(). Default value is false.
|
inline |
Returns whether or not the QGLViewer::ZOOM action zooms on the pivot point.
When set to false
(default), a zoom action will move the camera along its Camera::viewDirection(), i.e. back and forth along a direction perpendicular to the projection screen.
setZoomsOnPivotPoint() to true
will move the camera along an axis defined by the Camera::pivotPoint() and its current position instead. As a result, the projected position of the pivot point on screen will stay the same during a zoom.