ACG::Geometry Namespace Reference

Classes

class  NormalConeT
class  PlaneT
class  QuadricT

Typedefs

typedef PlaneT< float > Planef
typedef PlaneT< double > Planed
typedef QuadricT< float > Quadricf
 Quadric using floats.
typedef QuadricT< double > Quadricd
 Quadric using double.

Functions

template<typename Scalar >
bool baryCoord (const VectorT< Scalar, 3 > &_p, const VectorT< Scalar, 3 > &_u, const VectorT< Scalar, 3 > &_v, const VectorT< Scalar, 3 > &_w, VectorT< Scalar, 3 > &_result)
template<class Vec >
Vec::value_type triangleAreaSquared (const Vec &_v0, const Vec &_v1, const Vec &_v2)
 return squared area of triangle (_v0, _v1, _v2)
template<class Vec >
Vec::value_type distPointLineSquared (const Vec &_p, const Vec &_v0, const Vec &_v1, Vec *_min_v=0)
 squared distance from point _p to line (_v0,_v1)
template<class Vec >
Vec::value_type distPointTriangleSquared (const Vec &_p, const Vec &_v0, const Vec &_v1, const Vec &_v2, Vec &_nearestPoint)
 squared distance from point _p to triangle (_v0, _v1, _v2)
template<typename Scalar >
Scalar distLineLineSquared (const VectorT< Scalar, 3 > &_v00, const VectorT< Scalar, 3 > &_v01, const VectorT< Scalar, 3 > &_v10, const VectorT< Scalar, 3 > &_v11, VectorT< Scalar, 3 > *_min_v0=0, VectorT< Scalar, 3 > *_min_v1=0, bool _fastApprox=false)
 squared distance of lines (_v00, _v01) and (_v10, _v11)
template<typename Scalar >
bool circumCenter (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2, VectorT< Scalar, 3 > &_result)
 return circumcenter of triangle (_v0,_v1,_v2)
template<typename Scalar >
Scalar circumRadiusSquared (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2)
 return squared radius of circumcircle of triangle (_v0,_v1,_v2)
template<typename Scalar >
bool minSphere (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2, VectorT< Scalar, 3 > &_center, Scalar &_radius)
 construct min. enclosing sphere
template<typename Scalar >
Scalar minRadiusSquared (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2)
 return squared radius of min. enclosing circle of triangle (_v0,_v1,_v2)
template<typename Scalar >
bool circumCenter (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2, const VectorT< Scalar, 3 > &_v3, VectorT< Scalar, 3 > &_result)
 return circumcenter of tetrahedron (_v0,_v1,_v2,_v3)
template<typename Scalar >
VectorT< Scalar, 3 > perpendicular (const VectorT< Scalar, 3 > &_v)
 find a vector that's perpendicular to _v
template<typename Scalar >
bool baryCoord (const VectorT< Scalar, 2 > &_p, const VectorT< Scalar, 2 > &_u, const VectorT< Scalar, 2 > &_v, const VectorT< Scalar, 2 > &_w, VectorT< Scalar, 3 > &_result)
 barycentric coord of _p w.r.t. (_u,_v,_w) in 2D
template<typename Scalar >
bool lineIntersection (const VectorT< Scalar, 2 > &_v0, const VectorT< Scalar, 2 > &_v1, const VectorT< Scalar, 2 > &_v2, const VectorT< Scalar, 2 > &_v3, Scalar &_t1, Scalar &_t2)
 intersect two line segments (_v0,_v1) and (_v2,_v3)
template<typename Scalar >
bool circumCenter (const VectorT< Scalar, 2 > &_v0, const VectorT< Scalar, 2 > &_v1, const VectorT< Scalar, 2 > &_v2, VectorT< Scalar, 2 > &_result)
 return circumcenter of triangle (_v0,_v1,_v2)
template<typename Scalar , int N>
Scalar aspectRatio (const VectorT< Scalar, N > &_v0, const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2)
 return aspect ratio of triangle
template<typename Scalar , int N>
Scalar roundness (const VectorT< Scalar, N > &_v0, const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2)
 return roundness of triangle: 1=equilateral, 0=colinear
template<class Vec >
Vec::value_type triangleArea (const Vec &_v0, const Vec &_v1, const Vec &_v2)
 return area of triangle (_v0, _v1, _v2)
template<class Vec >
Vec::value_type distPointLine (const Vec &_p, const Vec &_v0, const Vec &_v1, Vec *_min_v=0)
 distance from point _p to line (_v0,_v1)
template<class Vec >
Vec::value_type distPointTriangle (const Vec &_p, const Vec &_v0, const Vec &_v1, const Vec &_v2, Vec &_nearestPoint)
 distance from point _p to triangle (_v0, _v1, _v2)
template<typename Scalar >
Scalar distLineLine (const VectorT< Scalar, 3 > &_v00, const VectorT< Scalar, 3 > &_v01, const VectorT< Scalar, 3 > &_v10, const VectorT< Scalar, 3 > &_v11, VectorT< Scalar, 3 > *_min_v0=0, VectorT< Scalar, 3 > *_min_v1=0)
 distance of lines (_v00, _v01) and (_v10, _v11)
template<typename Scalar >
Scalar minRadius (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2)
 return radius of min. enclosing circle of triangle (_v0,_v1,_v2)
template<typename Scalar >
Scalar circumRadius (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2)
 return radius of circumcircle of triangle (_v0,_v1,_v2)
template<typename Scalar >
Scalar circumRadiusSquared (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2, const VectorT< Scalar, 3 > &_v3)
 return squared radius of circumcircle of tetrahedron (_v0,_v1,_v2,_v3)
template<typename Scalar >
Scalar circumRadius (const VectorT< Scalar, 3 > &_v0, const VectorT< Scalar, 3 > &_v1, const VectorT< Scalar, 3 > &_v2, const VectorT< Scalar, 3 > &_v3)
 return radius of circumcircle of tetrahedron (_v0,_v1,_v2,_v3)
template<typename Scalar >
bool isInTriangle (const VectorT< Scalar, 2 > &_p, const VectorT< Scalar, 2 > &_u, const VectorT< Scalar, 2 > &_v, const VectorT< Scalar, 2 > &_w)
 is point _p in triangle (_v0,_v1,_v2)?
template<typename Scalar >
Scalar pointLineOrientation (const VectorT< Scalar, 2 > &_p, const VectorT< Scalar, 2 > &_v0, const VectorT< Scalar, 2 > &_v1)
 orientation of point _p w.r.t. line through _v0,_v1
template<typename Scalar >
bool isCCW (const VectorT< Scalar, 2 > &_v0, const VectorT< Scalar, 2 > &_v1, const VectorT< Scalar, 2 > &_v2)
 are 3 vertices in counterclockwise order?
template<typename Scalar >
bool isCW (const VectorT< Scalar, 2 > &_v0, const VectorT< Scalar, 2 > &_v1, const VectorT< Scalar, 2 > &_v2)
 are 3 vertices in clockwise order?

Detailed Description

This namespace holds some geometric types as well as geometry algorithms.


Function Documentation

template<typename Scalar >
bool ACG::Geometry::baryCoord ( const VectorT< Scalar, 3 > &  _p,
const VectorT< Scalar, 3 > &  _u,
const VectorT< Scalar, 3 > &  _v,
const VectorT< Scalar, 3 > &  _w,
VectorT< Scalar, 3 > &  _result 
) [inline]

barycentric coord of _p w.r.t. (_u,_v,_w) in 3D _p has to lie in plane (_u,_v,_w)

Referenced by isInTriangle().


acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .