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
Matrix3f m
Trackball()
Definition: trackball.h:23
Eigen::Vector3f mLastPoint3D
Definition: trackball.h:36
bool mLastPointOk
Definition: trackball.h:38
Vector v3
void setCamera(Camera *pCam)
Definition: trackball.h:27
void track(const Eigen::Vector2i &newPoint2D)
Definition: trackball.cpp:15
Camera * mpCamera
Definition: trackball.h:35
Mode mMode
Definition: trackball.h:37
bool mapToSphere(const Eigen::Vector2i &p2, Eigen::Vector3f &v3)
Definition: trackball.cpp:40
static Point3 p2
Definition: camera.h:36
void start(Mode m=Around)
Definition: trackball.h:25


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:04