trackball.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_TRACKBALL_H
11 #define EIGEN_TRACKBALL_H
12 
13 #include <Eigen/Geometry>
14 
15 class Camera;
16 
17 class Trackball
18 {
19  public:
20 
21  enum Mode {Around, Local};
22 
23  Trackball() : mpCamera(0) {}
24 
25  void start(Mode m = Around) { mMode = m; mLastPointOk = false; }
26 
27  void setCamera(Camera* pCam) { mpCamera = pCam; }
28 
29  void track(const Eigen::Vector2i& newPoint2D);
30 
31  protected:
32 
33  bool mapToSphere( const Eigen::Vector2i& p2, Eigen::Vector3f& v3);
34 
36  Eigen::Vector3f mLastPoint3D;
39 
40 };
41 
42 #endif // EIGEN_TRACKBALL_H
Camera
Definition: camera.h:36
Trackball::Local
@ Local
Definition: trackball.h:21
Trackball::Around
@ Around
Definition: trackball.h:21
Trackball
Definition: trackball.h:17
Trackball::start
void start(Mode m=Around)
Definition: trackball.h:25
simple::p2
static Point3 p2
Definition: testInitializePose3.cpp:51
Trackball::mpCamera
Camera * mpCamera
Definition: trackball.h:35
Trackball::setCamera
void setCamera(Camera *pCam)
Definition: trackball.h:27
Trackball::track
void track(const Eigen::Vector2i &newPoint2D)
Definition: trackball.cpp:15
Trackball::mapToSphere
bool mapToSphere(const Eigen::Vector2i &p2, Eigen::Vector3f &v3)
Definition: trackball.cpp:40
Trackball::mLastPointOk
bool mLastPointOk
Definition: trackball.h:38
Trackball::mMode
Mode mMode
Definition: trackball.h:37
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
v3
Vector v3
Definition: testSerializationBase.cpp:40
Trackball::Mode
Mode
Definition: trackball.h:21
Trackball::Trackball
Trackball()
Definition: trackball.h:23
Trackball::mLastPoint3D
Eigen::Vector3f mLastPoint3D
Definition: trackball.h:36


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:11:05