TR-mbed 1.0
Loading...
Searching...
No Matches
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
15class Camera;
16
18{
19 public:
20
21 enum Mode {Around, Local};
22
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
Definition AngleAxis_mimic_euler.cpp:1
Definition camera.h:37
Definition trackball.h:18
bool mapToSphere(const Eigen::Vector2i &p2, Eigen::Vector3f &v3)
Definition trackball.cpp:40
Trackball()
Definition trackball.h:23
Mode mMode
Definition trackball.h:37
void track(const Eigen::Vector2i &newPoint2D)
Definition trackball.cpp:15
Camera * mpCamera
Definition trackball.h:35
bool mLastPointOk
Definition trackball.h:38
void setCamera(Camera *pCam)
Definition trackball.h:27
Mode
Definition trackball.h:21
@ Around
Definition trackball.h:21
@ Local
Definition trackball.h:21
void start(Mode m=Around)
Definition trackball.h:25
Eigen::Vector3f mLastPoint3D
Definition trackball.h:36