libigl v2.5.0
Loading...
Searching...
No Matches
trackball.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_TRACKBALL_H
9#define IGL_TRACKBALL_H
10#include "igl_inline.h"
11#include <Eigen/Core>
12#include <Eigen/Geometry>
13
14namespace igl
15{
26 template <typename Q_type>
28 const double w,
29 const double h,
30 const Q_type speed_factor,
31 const double down_mouse_x,
32 const double down_mouse_y,
33 const double mouse_x,
34 const double mouse_y,
35 Q_type * quat);
48 template <typename Q_type>
50 const double w,
51 const double h,
52 const Q_type speed_factor,
53 const Q_type * down_quat,
54 const double down_mouse_x,
55 const double down_mouse_y,
56 const double mouse_x,
57 const double mouse_y,
58 Q_type * quat);
60 template <typename Scalardown_quat, typename Scalarquat>
62 const double w,
63 const double h,
64 const double speed_factor,
65 const Eigen::Quaternion<Scalardown_quat> & down_quat,
66 const double down_mouse_x,
67 const double down_mouse_y,
68 const double mouse_x,
69 const double mouse_y,
70 Eigen::Quaternion<Scalarquat> & quat);
71}
72
73#ifndef IGL_STATIC_LIBRARY
74# include "trackball.cpp"
75#endif
76
77#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
void trackball(const double w, const double h, const Q_type speed_factor, const double down_mouse_x, const double down_mouse_y, const double mouse_x, const double mouse_y, Q_type *quat)
Applies a trackball drag to identity.