gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
Trackball.cpp File Reference
#include <cmath>
#include "Trackball.h"
#include "Context.h"
#include <iostream>
Include dependency graph for Trackball.cpp:

Go to the source code of this file.

Macros

#define TRACKBALLSIZE   (.8)
 
#define RENORMCOUNT   97
 

Functions

static double tb_project_to_sphere (double, double, double)
 
static void normalize_quat (double[4])
 
void vzero (double *v)
 
void vset (double *v, double x, double y, double z)
 
void vsub (const double *src1, const double *src2, double *dst)
 
void vcopy (const double *v1, double *v2)
 
void vcross (const double *v1, const double *v2, double *cross)
 
double vlength (const double *v)
 
void vscale (double *v, double div)
 
void vnormal (double *v)
 
double vdot (const double *v1, const double *v2)
 
void vadd (const double *src1, const double *src2, double *dst)
 
void trackball (double q[4], double p1x, double p1y, double p2x, double p2y)
 
void axis_to_quat (double a[3], double phi, double q[4])
 
void add_quats (double q1[4], double q2[4], double dest[4])
 
void build_rotmatrix (double m[16], double q[4])
 

Macro Definition Documentation

◆ RENORMCOUNT

#define RENORMCOUNT   97

Definition at line 266 of file Trackball.cpp.

◆ TRACKBALLSIZE

#define TRACKBALLSIZE   (.8)

Definition at line 68 of file Trackball.cpp.

Function Documentation

◆ add_quats()

void add_quats ( double  q1[4],
double  q2[4],
double  dest[4] 
)

Definition at line 268 of file Trackball.cpp.

Referenced by drawContext::addQuaternion(), drawContext::addQuaternionFromAxisAndAngle(), and drawContext::setQuaternionFromEulerAngles().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ axis_to_quat()

void axis_to_quat ( double  a[3],
double  phi,
double  q[4] 
)

Definition at line 213 of file Trackball.cpp.

Referenced by drawContext::addQuaternionFromAxisAndAngle(), drawContext::setQuaternionFromEulerAngles(), and trackball().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_rotmatrix()

void build_rotmatrix ( double  m[16],
double  q[4] 
)

Definition at line 323 of file Trackball.cpp.

Referenced by drawContext::buildRotationMatrix().

Here is the caller graph for this function:

◆ normalize_quat()

static void normalize_quat ( double  q[4])
static

Definition at line 309 of file Trackball.cpp.

Referenced by add_quats().

Here is the caller graph for this function:

◆ tb_project_to_sphere()

static double tb_project_to_sphere ( double  r,
double  x,
double  y 
)
static

Definition at line 226 of file Trackball.cpp.

Referenced by trackball().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackball()

void trackball ( double  q[4],
double  p1x,
double  p1y,
double  p2x,
double  p2y 
)

Definition at line 166 of file Trackball.cpp.

Referenced by drawContext::addQuaternion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vadd()

void vadd ( const double *  src1,
const double *  src2,
double *  dst 
)

Definition at line 146 of file Trackball.cpp.

Referenced by add_quats().

Here is the caller graph for this function:

◆ vcopy()

void vcopy ( const double *  v1,
double *  v2 
)

Definition at line 101 of file Trackball.cpp.

Referenced by add_quats(), axis_to_quat(), and vcross().

Here is the caller graph for this function:

◆ vcross()

void vcross ( const double *  v1,
const double *  v2,
double *  cross 
)

Definition at line 109 of file Trackball.cpp.

Referenced by add_quats(), and trackball().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vdot()

double vdot ( const double *  v1,
const double *  v2 
)

Definition at line 140 of file Trackball.cpp.

Referenced by add_quats().

Here is the caller graph for this function:

◆ vlength()

double vlength ( const double *  v)

Definition at line 120 of file Trackball.cpp.

Referenced by robustPredicates::orient2dexact(), robustPredicates::orient3dadapt(), trackball(), and vnormal().

Here is the caller graph for this function:

◆ vnormal()

void vnormal ( double *  v)

Definition at line 134 of file Trackball.cpp.

Referenced by axis_to_quat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vscale()

void vscale ( double *  v,
double  div 
)

Definition at line 126 of file Trackball.cpp.

Referenced by add_quats(), axis_to_quat(), and vnormal().

Here is the caller graph for this function:

◆ vset()

void vset ( double *  v,
double  x,
double  y,
double  z 
)

Definition at line 85 of file Trackball.cpp.

Referenced by trackball(), and GModel::writeCELUM().

Here is the caller graph for this function:

◆ vsub()

void vsub ( const double *  src1,
const double *  src2,
double *  dst 
)

Definition at line 93 of file Trackball.cpp.

Referenced by trackball().

Here is the caller graph for this function:

◆ vzero()

void vzero ( double *  v)

Definition at line 77 of file Trackball.cpp.

Referenced by trackball().

Here is the caller graph for this function: