Base class for camera control. This class defines the interface for controlling the camera in the viewer. It provides virtual methods for handling mouse input, updating the camera state, and getting the view matrix. Derived classes can implement specific camera control schemes (e.g., orbit, FPV) by overriding these methods.
More...
#include <camera_control.hpp>
|
| virtual | ~CameraControl () |
| virtual void | reset_center () |
| | Reset the shift of the camera.
|
| virtual void | lookat (const Eigen::Vector3f &pt) |
| | Move the camera to look at the given point. The point is expected to be in world coordinates.
|
| virtual void | lookat (const Eigen::Isometry3f &T_world_sensor) |
| | Move the camera to look at the given transform. The camera will look at the translation part of the transform, and optionally align its orientation with the rotation part.
|
| virtual void | lookat (const Eigen::Isometry3d &T_world_sensor) |
| virtual void | mouse (const Eigen::Vector2f &p, int button, bool down) |
| | Mouse event callback. This method is called when a mouse button is pressed or released.
|
| virtual void | drag (const Eigen::Vector2f &p, int button) |
| | Mouse drag event callback. This method is called when the mouse is moved while a button is pressed.
|
| virtual void | scroll (const Eigen::Vector2f &rel) |
| | Scroll event callback. This method is called when the mouse wheel is scrolled.
|
| virtual void | update () |
| | Update the camera state. This method can be called every frame to update the camera based on user input or animations.
|
| virtual void | updown (double p) |
| | Keyboard page up/down event callback. This method is called while the user is pressing the page up/down keys.
|
| virtual void | arrow (const Eigen::Vector2f &p) |
| | Keyboard arrow key event callback. This method is called while the user is pressing the arrow keys.
|
| virtual Eigen::Vector2f | depth_range () const |
| | Get the depth range of the camera. This method can be overridden by derived classes to specify a custom depth range for rendering.
|
| virtual Eigen::Matrix4f | view_matrix () const =0 |
| | Get the view matrix of the camera. This method must be implemented by derived classes to return the current view transformation matrix.
|
| virtual std::string | name () const |
| virtual void | load (std::istream &ist) |
| virtual void | save (std::ostream &ost) const |
Base class for camera control. This class defines the interface for controlling the camera in the viewer. It provides virtual methods for handling mouse input, updating the camera state, and getting the view matrix. Derived classes can implement specific camera control schemes (e.g., orbit, FPV) by overriding these methods.
- Note
- Many of default camera control methods have an interface that combines a programmatic API (e.g., lookat()) and user input (e.g., mouse dragging). For example, the lookat() method can be used to programmatically set the camera to look at a specific point in the world, while the mouse dragging can be used to shift the camera's center of focus. The reset_center() method can be used to reset any such shifts.
◆ ~CameraControl()
| virtual guik::CameraControl::~CameraControl |
( |
| ) |
|
|
inlinevirtual |
◆ arrow()
| virtual void guik::CameraControl::arrow |
( |
const Eigen::Vector2f & | p | ) |
|
|
inlinevirtual |
◆ depth_range()
| virtual Eigen::Vector2f guik::CameraControl::depth_range |
( |
| ) |
const |
|
inlinevirtual |
◆ drag()
| virtual void guik::CameraControl::drag |
( |
const Eigen::Vector2f & | p, |
|
|
int | button ) |
|
inlinevirtual |
◆ load()
| virtual void guik::CameraControl::load |
( |
std::istream & | ist | ) |
|
|
inlinevirtual |
◆ lookat() [1/3]
| virtual void guik::CameraControl::lookat |
( |
const Eigen::Isometry3d & | T_world_sensor | ) |
|
|
inlinevirtual |
◆ lookat() [2/3]
| virtual void guik::CameraControl::lookat |
( |
const Eigen::Isometry3f & | T_world_sensor | ) |
|
|
inlinevirtual |
Move the camera to look at the given transform. The camera will look at the translation part of the transform, and optionally align its orientation with the rotation part.
- Parameters
-
| T_world_sensor | The transform to look at, in world coordinates. |
Reimplemented in guik::SensorViewCameraControl.
◆ lookat() [3/3]
| virtual void guik::CameraControl::lookat |
( |
const Eigen::Vector3f & | pt | ) |
|
|
inlinevirtual |
◆ mouse()
| virtual void guik::CameraControl::mouse |
( |
const Eigen::Vector2f & | p, |
|
|
int | button, |
|
|
bool | down ) |
|
inlinevirtual |
◆ name()
| virtual std::string guik::CameraControl::name |
( |
| ) |
const |
|
inlinevirtual |
◆ reset_center()
| virtual void guik::CameraControl::reset_center |
( |
| ) |
|
|
inlinevirtual |
◆ save()
| virtual void guik::CameraControl::save |
( |
std::ostream & | ost | ) |
const |
|
inlinevirtual |
◆ scroll()
| virtual void guik::CameraControl::scroll |
( |
const Eigen::Vector2f & | rel | ) |
|
|
inlinevirtual |
◆ update()
| virtual void guik::CameraControl::update |
( |
| ) |
|
|
inlinevirtual |
Update the camera state. This method can be called every frame to update the camera based on user input or animations.
Reimplemented in guik::FPSCameraControl.
◆ updown()
| virtual void guik::CameraControl::updown |
( |
double | p | ) |
|
|
inlinevirtual |
◆ view_matrix()
| virtual Eigen::Matrix4f guik::CameraControl::view_matrix |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: