Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
trackball.cpp File Reference
#include "trackball.h"
#include "EPS.h"
#include "dot.h"
#include "cross.h"
#include "axis_angle_to_quat.h"
#include "quat_mult.h"
#include <cmath>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <iostream>
+ Include dependency graph for trackball.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename Q_type >
static IGL_INLINE Q_type _QuatD (double w, double h)
 
template<typename Q_type >
static IGL_INLINE Q_type _QuatIX (double x, double w, double h)
 
template<typename Q_type >
static IGL_INLINE Q_type _QuatIY (double y, double w, double h)
 

Function Documentation

◆ _QuatD()

template<typename Q_type >
static IGL_INLINE Q_type _QuatD ( double  w,
double  h 
)
static
24{
25 using namespace std;
26 return (Q_type)(std::abs(w) < std::abs(h) ? std::abs(w) : std::abs(h)) - 4;
27}
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half abs(const half &a)
Definition Half.h:445
STL namespace.

◆ _QuatIX()

template<typename Q_type >
static IGL_INLINE Q_type _QuatIX ( double  x,
double  w,
double  h 
)
static
30{
31 return (2.0f*(Q_type)x - (Q_type)w - 1.0f)/_QuatD<Q_type>(w, h);
32}

◆ _QuatIY()

template<typename Q_type >
static IGL_INLINE Q_type _QuatIY ( double  y,
double  w,
double  h 
)
static
35{
36 return (-2.0f*(Q_type)y + (Q_type)h - 1.0f)/_QuatD<Q_type>(w, h);
37}