Signal/Geometry Processing Library (SPL) 1.1.24 |

Classes | Functions
CGAL Utilities

CGAL utilities. More...

## Classes
class | SPL::Arcball< T >
| Arcball. More...
struct | SPL::Rotation_3< T >
| A 3-D rotation. More...
struct | SPL::Quaternion< T >
| A quaternion represented in terms of its scalar and vector parts. More...

## Functions
template<class T >
T::Point_3 | SPL::closestPointOnRay (const typename CGAL::Point_3< T > &rayOrigin, const typename CGAL::Vector_3< T > &rayDir, const typename CGAL::Point_3< T > &point)
| Compute the closest point on a ray to the specified point. More...
template<class T >
std::pair< bool, typename T::Point_3 > | SPL::findRaySphereIntersection (const typename CGAL::Point_3< T > &sphereCenter, typename T::FT sphereRadius, const typename CGAL::Point_3< T > &rayOrigin, const typename CGAL::Vector_3< T > &rayDir)
| Compute the intersection of a ray and a sphere. More...
template<class T >
std::pair< bool, typename T::Point_3 > | SPL::findRayPlaneIntersection (const typename CGAL::Point_3< T > &planePoint, const typename CGAL::Vector_3< T > &planeNormal, const typename CGAL::Point_3< T > &rayOrigin, const typename CGAL::Vector_3< T > &rayDir)
| Compute the intersection of a ray and a plane. More...
template<class T >
T::FT | SPL::norm (const typename CGAL::Vector_3< T > &v)
| Compute the norm of a vector. More...
template<class T >
T::Vector_3 | SPL::normalize (const typename CGAL::Vector_3< T > &v)
| Compute a unit vector. More...
template<class T >
T::FT | SPL::angleBetweenVectors (const typename CGAL::Vector_3< T > &u, const CGAL::Vector_3< T > &v)
| Compute the angle between two vectors. More...
template<class T >
Quaternion< T > | SPL::operator* (const Quaternion< T > &q, const Quaternion< T > &r)
| Compute the product of two quaternions. More...
template<class T >
Quaternion< T > | SPL::operator/ (const Quaternion< T > &q, const Quaternion< T > &r)
| Compute the quotient of two quaternions. More...
template<class T >
Quaternion< T > | SPL::rotationToQuaternion (const Rotation_3< T > &rot)
| Convert a rotation into its corresponding quaternion. More...
template<class T >
Rotation_3< T > | SPL::quaternionToRotation (const Quaternion< T > &q)
| Convert a unit-norm quaternion into its corresponding rotation. More...
| SPL::Arcball< T >::Arcball ()
| Create an arcball. More...
void | SPL::Arcball< T >::initialize (double arcBallRadius, const Point &eyePos, const Vector &eyeDir, const Vector &eyeUp, const Point &sceneCenter)
| Initialize the state of an arcball. More...
void | SPL::Arcball< T >::setMode (int mode)
| Set the arcball rotation mode. More...
void | SPL::Arcball< T >::start (const Point &pos)
| Set the starting position for arcball movement. More...
void | SPL::Arcball< T >::move (const Point &pos)
| Set the current position for arcball movement. More...
void | SPL::Arcball< T >::clear ()
| Clear the starting and current positions for the arcball. More...
Rotation | SPL::Arcball< T >::getRotation () const
| Get the rotation required to turn the arcball from the starting position to the current position. More...
static Rotation | SPL::Arcball< T >::combineRotations (const Rotation &, const Rotation &)
| Combine two rotations. More...

## Detailed Description

CGAL utilities.

## Function Documentation

template<class T >

T::FT SPL::angleBetweenVectors | ( | const typename CGAL::Vector_3< T > & | u,
|  | const CGAL::Vector_3< T > & | v
| ) |  |
| inline

Compute the angle between two vectors.

template<class T >

SPL::Arcball< T >::Arcball | ( |  | ) |

Create an arcball.

template<class T >

void SPL::Arcball< T >::clear | ( |  | ) |

Clear the starting and current positions for the arcball.

template<class T >

T::Point_3 SPL::closestPointOnRay | ( | const typename CGAL::Point_3< T > & | rayOrigin,
|  | const typename CGAL::Vector_3< T > & | rayDir,
|  | const typename CGAL::Point_3< T > & | point
| ) |  |

Compute the closest point on a ray to the specified point.

template<class T>

Arcball< T >::Rotation SPL::Arcball< T >::combineRotations | ( | const Rotation & | ,
|  | const Rotation & |
| ) |  |
| static

Combine two rotations.

template<class T >

std::pair<bool, typename T::Point_3> SPL::findRayPlaneIntersection | ( | const typename CGAL::Point_3< T > & | planePoint,
|  | const typename CGAL::Vector_3< T > & | planeNormal,
|  | const typename CGAL::Point_3< T > & | rayOrigin,
|  | const typename CGAL::Vector_3< T > & | rayDir
| ) |  |

Compute the intersection of a ray and a plane.

Compute the intersection of a ray and a plane. The return value is a pair. The first element of the pair is a boolean. This value is true if an intersection point was found, and is false otherwise. The second element in the pair is the intersection point closest to the ray's origin. If no intersection point was found, the ray's origin is returned.

template<class T >

std::pair<bool, typename T::Point_3> SPL::findRaySphereIntersection | ( | const typename CGAL::Point_3< T > & | sphereCenter,
|  | typename T::FT | sphereRadius,
|  | const typename CGAL::Point_3< T > & | rayOrigin,
|  | const typename CGAL::Vector_3< T > & | rayDir
| ) |  |

Compute the intersection of a ray and a sphere.

Compute the intersection of a ray and a sphere. The return value is a pair. The first element in the pair is a boolean value. This value is true if an intersection point was found, and is false otherwise. The second element in the pair is the intersection point closest to the ray's origin. If no intersection was found, the point on the sphere that is closest to the ray is returned.

template<class T >

Arcball< T >::Rotation SPL::Arcball< T >::getRotation | ( |  | ) | const

Get the rotation required to turn the arcball from the starting position to the current position.

template<class T>

void SPL::Arcball< T >::initialize | ( | double | arcBallRadius,
|  | const Point & | eyePos,
|  | const Vector & | eyeDir,
|  | const Vector & | eyeUp,
|  | const Point & | sceneCenter
| ) |  |

Initialize the state of an arcball.

template<class T>

void SPL::Arcball< T >::move | ( | const Point & | pos | ) |

Set the current position for arcball movement.

template<class T >

T::FT SPL::norm | ( | const typename CGAL::Vector_3< T > & | v | ) |
| inline

Compute the norm of a vector.

template<class T >

T::Vector_3 SPL::normalize | ( | const typename CGAL::Vector_3< T > & | v | ) |
| inline

Compute a unit vector.

Compute a unit vector in the direction of the given vector. If the zero vector is given, the zero vector is returned.

template<class T >

Quaternion<T> SPL::operator* | ( | const Quaternion< T > & | q,
|  | const Quaternion< T > & | r
| ) |  |

Compute the product of two quaternions.

template<class T >

Quaternion<T> SPL::operator/ | ( | const Quaternion< T > & | q,
|  | const Quaternion< T > & | r
| ) |  |

Compute the quotient of two quaternions.

template<class T >

Rotation_3<T> SPL::quaternionToRotation | ( | const Quaternion< T > & | q | ) |

Convert a unit-norm quaternion into its corresponding rotation.

template<class T >

Quaternion<T> SPL::rotationToQuaternion | ( | const Rotation_3< T > & | rot | ) |

Convert a rotation into its corresponding quaternion.

template<class T >

void SPL::Arcball< T >::setMode | ( | int | mode | ) |

Set the arcball rotation mode.

template<class T>

void SPL::Arcball< T >::start | ( | const Point & | pos | ) |

Set the starting position for arcball movement.