geom Namespace Reference


Classes

class  BoundingBox
struct  ThrowingCatchAll
class  ParametricCurve
 The base class for any parametric curve. More...
class  ControlPointCurveBase
 The base class for any curve defined by control points. More...
class  Line
 A line segment. More...
class  Polyline
 A polyline. More...
class  Arc
 An arc. More...
class  Arc< 2 >
class  PointNd
class  VecNd
class  Transform
 A 4x4 matrix for transformations. More...

Namespaces

namespace  detail

Typedefs

typedef BoundingBox< Point2d > BoundingBox2d
typedef BoundingBox< Point3d > BoundingBox3d
typedef shared_ptr< ParametricCurve< 2 > > CurvePtr2d
typedef shared_ptr< ParametricCurve< 3 > > CurvePtr3d
typedef std::vector< CurvePtr2d > CompositeCurve2d
typedef std::vector< CurvePtr3d > CompositeCurve3d
typedef Line< 2 > Line2d
typedef Line< 3 > Line3d
typedef Polyline< 2 > Polyline2d
typedef Polyline< 3 > Polyline3d
typedef Arc< 2 > Arc2d
typedef Arc< 3 > Arc3d
typedef boost::variant< geom::Point2d,
CurvePtr2d > 
CurveIntersectionResult
typedef std::vector< CurveIntersectionResult > CurveIntersectionResults
typedef PointNd< 2 > Point2d
 Definition of Point2d.
typedef VecNd< 2 > Vec2d
 Definition of Vec2d.
typedef PointNd< 3 > Point3d
 Definition of Point3d.
typedef VecNd< 3 > Vec3d
 Definition of Vec3d.
typedef PointNd< 4 > Point4d
 Definition of Point4d.
typedef VecNd< 4 > Vec4d
 Definition of Vec4d.

Functions

int maxBoxCoord (int)
double maxBoxCoord (double)
template<class B, class P>
bool isPointInBox (const B &box, const P &pt)
template<class B>
bool boxesIntersect (const B &b1, const B &b2)
template<class B, class P>
void getBoundingBox (const P &pt, B *pBox)
template<class B>
void expandBoundingBox (double eps, B *pBox)
template<class T>
PointNd< util::TypeStripper<
T >::base_type::Dim > 
getStartPoint (T curve)
template<class T>
PointNd< util::TypeStripper<
T >::base_type::Dim > 
getEndPoint (T curve)
template<class T, class P>
void setStartPoint (T curve, const P &pt)
template<class T, class P>
void setEndPoint (T curve, const P &pt)
template<int n>
shared_ptr< Line< n > > makeLine ()
template<int n>
shared_ptr< Line< n > > makeLine (const PointNd< n > &start, const PointNd< n > &end)
template<int n>
shared_ptr< Polyline< n > > makePolyline (const std::vector< geom::PointNd< n > > &pts)
shared_ptr< Arc< 2 > > makeArc (const Point2d &center, double radius, double startAngle, double endAngle)
shared_ptr< Arc< 2 > > makeCCWArcCenter (const Point2d &center, const Point2d &startPt, const Point2d &endPt)
shared_ptr< Arc< 2 > > makeCCWArcCenterRadius (const Point2d &center, const Point2d &startPt, const Point2d &endPt, double radius)
shared_ptr< Arc< 2 > > makeCWArcCenter (const Point2d &center, const Point2d &startPt, const Point2d &endPt)
shared_ptr< Arc< 2 > > makeCircle (const Point2d &center, double radius)
CurvePtr2d makeArcTangents (const Point2d &startPt, const Point2d &commonTan, const Point2d &endPt)
template<class Curve>
void getBoundingBox (const Curve &c, BoundingBox< geom::Point2d > *pBox)
template<class Curve>
void intersectCurves (const Curve &c1, const Curve &c2, double tol, CurveIntersectionResults *pIntersections)
template<class Curve>
double getLength (const Curve &curve)
CurvePtr2d createSubCurve (const CurvePtr2d &curve, double startParam, double endParam)
template<class Curve, class Point>
bool projectPointToCurve (const Curve &curve, const Point &pt, double tol, Point *pProjPt=0, double *pParam=0)
template<class Curve, class Point>
void tessellateCurve (const Curve &curve, double tol, std::vector< Point > *pPoints)
template<class CurveIter, class Point>
void tessellateLoop (CurveIter begin, CurveIter end, double tol, std::vector< Point > *pPoints)
template<class Curves, class Point>
void tessellateLoop (const Curves &curves, double tol, std::vector< Point > *pPoints)
template<class Curves>
void reverseLoop (Curves &curves)
template<class CurveIter, class KnotIter>
void createKnots (CurveIter begin, CurveIter end, KnotIter outIt)
template<class KnotIter>
int getSpan (KnotIter begin, KnotIter end, double param)
template<class Arc, class P>
bool projectPointToArc (const Arc &arc, const P &pt, double tol, P *pProjPt=0, double *pParam=0)
Vec3d crossProduct (const Vec3d &v0, const Vec3d &v1)
 The cross-product of two 3-dimensional vectors.
Point3d crossProduct (const Point3d &v0, const Point3d &v1)
 The cross-product of two 3-dimensional points.
template<class V>
double tripleProduct (const V &v0, const V &v1, const V &v2)
double crossProduct (const Vec2d &v0, const Vec2d &v1)
 The cross-product of two 2-dimensional vectors.
double crossProduct (const Point2d &v0, const Point2d &v1)
 The cross-product of two 2-dimensional points.
template<int n>
VecNd< n > normalize (const VecNd< n > &v)
 Take a vector and return a unit vector in the same direction.
template<int n>
double length (const VecNd< n > &v)
 The magnitude of a vector.
double angle (const Vec2d &v0, const Vec2d &v1)
 The angle between two planar vectors, in radians.
template<int n>
double distance (const PointNd< n > &p0, const PointNd< n > &p1)
 The Euclidean distance between two points.
template<class Vec>
Vec projectParallel (const Vec &v1, const Vec &v2)
 Get the component of v1 that is in the direction of v2.
template<class Vec>
Vec projectPerp (const Vec &v1, const Vec &v2)
 Get the component of v1 that is not in the direction of v2.
template<int n>
PointNd< n > operator+ (const PointNd< n > &pt, const VecNd< n > &vec)
template<int n>
PointNd< n > operator- (const PointNd< n > &pt, const VecNd< n > &vec)
template<int n>
PointNd< n > operator+ (const PointNd< n > &pt, const PointNd< n > &pt1)
template<int n>
PointNd< n > operator * (const PointNd< n > &pt, double scale)
template<int n>
PointNd< n > operator/ (const PointNd< n > &pt, double scale)
template<int n>
PointNd< n > operator * (double scale, const PointNd< n > &pt)
template<int n>
VecNd< n > operator+ (const VecNd< n > &vec0, const VecNd< n > &vec)
template<int n>
VecNd< n > operator- (const VecNd< n > &vec0, const VecNd< n > &vec)
template<int n>
VecNd< n > operator * (const VecNd< n > &v, double scale)
template<int n>
VecNd< n > operator * (double scale, const VecNd< n > &v)
template<int n>
PointNd< n > operator- (const PointNd< n > &pt0, const PointNd< n > &pt1)
template<int n>
PointNd< n > operator- (const PointNd< n > &pt)
template<int n>
double operator * (const VecNd< n > &vec0, const VecNd< n > &vec1)
 dot product of two vectors.
template<int n>
double operator * (const PointNd< n > &pt0, const PointNd< n > &pt1)
 dot product of two points.
template<int n>
PointNd< n > linComb (double d0, const PointNd< n > &pt0, double d1, const PointNd< n > &pt1)
 Linear combination of two points.
template<int n>
VecNd< n > linComb (double d0, const VecNd< n > &pt0, double d1, const VecNd< n > &pt1)
 Linear combination of two vectors.
template<int n>
bool operator== (const PointNd< n > &pt0, const PointNd< n > &pt1)
 Compare two points for equality.
template<int n>
bool operator!= (const PointNd< n > &pt0, const PointNd< n > &pt1)
 Compare two points for inequality.
template<int n>
bool operator< (const PointNd< n > &pt0, const PointNd< n > &pt1)
template<int n>
PointNd< n-1 > projectHomogeneous (const PointNd< n > &pt)
template<int n>
PointNd< n+1 > makeHomogeneous (const PointNd< n > &pt, double weight=1.0)
PointNd< 3 > operator+ (const PointNd< 3 > &pt, const VecNd< 3 > &vec)
PointNd< 3 > operator+ (const PointNd< 3 > &pt, const PointNd< 3 > &pt1)
PointNd< 3 > operator- (const PointNd< 3 > &pt, const VecNd< 3 > &vec)
PointNd< 3 > operator * (const PointNd< 3 > &pt, double scale)
PointNd< 3 > operator/ (const PointNd< 3 > &pt, double scale)
template<class P>
P projectPointToLine (const P &startPt, const P &endPt, const P &pt)
 Project the point pt to the infinite line through startPt and endPt.
template<class P>
bool projectPointToSegment (const P &startPt, const P &endPt, const P &pt, double tol, P *pProjPt=0, double *pParam=0)
template<class P>
int getOrientation (const P &p0, const P &p1, const P &pt, double tol)


Typedef Documentation

typedef Arc<2> geom::Arc2d
 

typedef Arc<3> geom::Arc3d
 

typedef BoundingBox<Point2d> geom::BoundingBox2d
 

typedef BoundingBox<Point3d> geom::BoundingBox3d
 

typedef std::vector<CurvePtr2d> geom::CompositeCurve2d
 

typedef std::vector<CurvePtr3d> geom::CompositeCurve3d
 

typedef boost::variant<geom::Point2d, CurvePtr2d> geom::CurveIntersectionResult
 

typedef std::vector<CurveIntersectionResult> geom::CurveIntersectionResults
 

typedef shared_ptr<ParametricCurve<2> > geom::CurvePtr2d
 

typedef shared_ptr<ParametricCurve<3> > geom::CurvePtr3d
 

typedef Line<2> geom::Line2d
 

typedef Line<3> geom::Line3d
 

typedef PointNd<2> geom::Point2d
 

Definition of Point2d.

typedef PointNd<3> geom::Point3d
 

Definition of Point3d.

typedef PointNd<4> geom::Point4d
 

Definition of Point4d.

typedef Polyline<2> geom::Polyline2d
 

typedef Polyline<3> geom::Polyline3d
 

typedef VecNd<2> geom::Vec2d
 

Definition of Vec2d.

typedef VecNd<3> geom::Vec3d
 

Definition of Vec3d.

typedef VecNd<4> geom::Vec4d
 

Definition of Vec4d.


Function Documentation

double geom::angle (  const Vec2d &  v0,
const Vec2d &  v1
)  [inline]
 

The angle between two planar vectors, in radians.

template<class B>
bool geom::boxesIntersect (  const B &  b1,
const B &  b2
)  [inline]
 

template<class CurveIter, class KnotIter>
void geom::createKnots (  CurveIter  begin,
CurveIter  end,
KnotIter  outIt
)  [inline]
 

CurvePtr2d geom::createSubCurve (  const CurvePtr2d &  curve,
double  startParam,
double  endParam
) 
 

double geom::crossProduct (  const Point2d &  v0,
const Point2d &  v1
)  [inline]
 

The cross-product of two 2-dimensional points.

double geom::crossProduct (  const Vec2d &  v0,
const Vec2d &  v1
)  [inline]
 

The cross-product of two 2-dimensional vectors.

Point3d geom::crossProduct (  const Point3d &  v0,
const Point3d &  v1
)  [inline]
 

The cross-product of two 3-dimensional points.

Vec3d geom::crossProduct (  const Vec3d &  v0,
const Vec3d &  v1
)  [inline]
 

The cross-product of two 3-dimensional vectors.

template<int n>
double geom::distance (  const PointNd< n > &  p0,
const PointNd< n > &  p1
)  [inline]
 

The Euclidean distance between two points.

template<class B>
void geom::expandBoundingBox (  double  eps,
B *  pBox
)  [inline]
 

template<class Curve>
void geom::getBoundingBox (  const Curve &  c,
BoundingBox< geom::Point2d > *  pBox
)  [inline]
 

template<class B, class P>
void geom::getBoundingBox (  const P &  pt,
B *  pBox
)  [inline]
 

template<class T>
PointNd<util::TypeStripper<T>::base_type::Dim> geom::getEndPoint (  T  curve  )  [inline]
 

template<class Curve>
double geom::getLength (  const Curve &  curve  )  [inline]
 

template<class P>
int geom::getOrientation (  const P &  p0,
const P &  p1,
const P &  pt,
double  tol
) 
 

Return 1 if pt is on the left of p0p1 or -1 if pt is on the right of it. Return 0 if it is on the line p0p1 (within tol)

template<class KnotIter>
int geom::getSpan (  KnotIter  begin,
KnotIter  end,
double  param
) 
 

template<class T>
PointNd<util::TypeStripper<T>::base_type::Dim> geom::getStartPoint (  T  curve  )  [inline]
 

template<class Curve>
void geom::intersectCurves (  const Curve &  c1,
const Curve &  c2,
double  tol,
CurveIntersectionResults *  pIntersections
)  [inline]
 

template<class B, class P>
bool geom::isPointInBox (  const B &  box,
const P &  pt
)  [inline]
 

template<int n>
double geom::length (  const VecNd< n > &  v  )  [inline]
 

The magnitude of a vector.

template<int n>
VecNd<n> geom::linComb (  double  d0,
const VecNd< n > &  pt0,
double  d1,
const VecNd< n > &  pt1
) 
 

Linear combination of two vectors.

template<int n>
PointNd<n> geom::linComb (  double  d0,
const PointNd< n > &  pt0,
double  d1,
const PointNd< n > &  pt1
) 
 

Linear combination of two points.

shared_ptr<Arc<2> > geom::makeArc (  const Point2d &  center,
double  radius,
double  startAngle,
double  endAngle
) 
 

If endAngle < startAngle, it's a CW arc. The startAngle must always be in [0, 2pi); the endAngle has no restriction.

CurvePtr2d geom::makeArcTangents (  const Point2d &  startPt,
const Point2d &  commonTan,
const Point2d &  endPt
) 
 

shared_ptr<Arc<2> > geom::makeCCWArcCenter (  const Point2d &  center,
const Point2d &  startPt,
const Point2d &  endPt
) 
 

shared_ptr<Arc<2> > geom::makeCCWArcCenterRadius (  const Point2d &  center,
const Point2d &  startPt,
const Point2d &  endPt,
double  radius
) 
 

shared_ptr<Arc<2> > geom::makeCircle (  const Point2d &  center,
double  radius
) 
 

shared_ptr<Arc<2> > geom::makeCWArcCenter (  const Point2d &  center,
const Point2d &  startPt,
const Point2d &  endPt
) 
 

template<int n>
PointNd<n+1> geom::makeHomogeneous (  const PointNd< n > &  pt,
double  weight = 1.0
)  [inline]
 

Take a point in the w=1 plane and put it in homogeneous space.

Parameters:
weight The w-value of the "un-projected" point.

template<int n>
shared_ptr<Line<n> > geom::makeLine (  const PointNd< n > &  start,
const PointNd< n > &  end
)  [inline]
 

template<int n>
shared_ptr<Line<n> > geom::makeLine (   ) 
 

template<int n>
shared_ptr<Polyline<n> > geom::makePolyline (  const std::vector< geom::PointNd< n > > &  pts  ) 
 

double geom::maxBoxCoord (  double   )  [inline]
 

int geom::maxBoxCoord (  int   )  [inline]
 

template<int n>
VecNd<n> geom::normalize (  const VecNd< n > &  v  ) 
 

Take a vector and return a unit vector in the same direction.

PointNd<3> geom::operator * (  const PointNd< 3 > &  pt,
double  scale
)  [inline]
 

template<int n>
double geom::operator * (  const PointNd< n > &  pt0,
const PointNd< n > &  pt1
)  [inline]
 

dot product of two points.

template<int n>
double geom::operator * (  const VecNd< n > &  vec0,
const VecNd< n > &  vec1
)  [inline]
 

dot product of two vectors.

template<int n>
VecNd<n> geom::operator * (  double  scale,
const VecNd< n > &  v
)  [inline]
 

template<int n>
VecNd<n> geom::operator * (  const VecNd< n > &  v,
double  scale
)  [inline]
 

template<int n>
PointNd<n> geom::operator * (  double  scale,
const PointNd< n > &  pt
)  [inline]
 

template<int n>
PointNd<n> geom::operator * (  const PointNd< n > &  pt,
double  scale
)  [inline]
 

template<int n>
bool geom::operator!= (  const PointNd< n > &  pt0,
const PointNd< n > &  pt1
) 
 

Compare two points for inequality.

PointNd<3> geom::operator+ (  const PointNd< 3 > &  pt,
const PointNd< 3 > &  pt1
)  [inline]
 

PointNd<3> geom::operator+ (  const PointNd< 3 > &  pt,
const VecNd< 3 > &  vec
)  [inline]
 

template<int n>
VecNd<n> geom::operator+ (  const VecNd< n > &  vec0,
const VecNd< n > &  vec
)  [inline]
 

template<int n>
PointNd<n> geom::operator+ (  const PointNd< n > &  pt,
const PointNd< n > &  pt1
)  [inline]
 

template<int n>
PointNd<n> geom::operator+ (  const PointNd< n > &  pt,
const VecNd< n > &  vec
)  [inline]
 

PointNd<3> geom::operator- (  const PointNd< 3 > &  pt,
const VecNd< 3 > &  vec
)  [inline]
 

template<int n>
PointNd<n> geom::operator- (  const PointNd< n > &  pt  )  [inline]
 

template<int n>
PointNd<n> geom::operator- (  const PointNd< n > &  pt0,
const PointNd< n > &  pt1
)  [inline]
 

template<int n>
VecNd<n> geom::operator- (  const VecNd< n > &  vec0,
const VecNd< n > &  vec
)  [inline]
 

template<int n>
PointNd<n> geom::operator- (  const PointNd< n > &  pt,
const VecNd< n > &  vec
)  [inline]
 

PointNd<3> geom::operator/ (  const PointNd< 3 > &  pt,
double  scale
)  [inline]
 

template<int n>
PointNd<n> geom::operator/ (  const PointNd< n > &  pt,
double  scale
)  [inline]
 

template<int n>
bool geom::operator< (  const PointNd< n > &  pt0,
const PointNd< n > &  pt1
) 
 

A total ordering operation on points. It returns pt0[ii] < pt1[ii] for the smallest ii such that pt0[jj] == pt1[jj] for all 0 <= jj < ii.

template<int n>
bool geom::operator== (  const PointNd< n > &  pt0,
const PointNd< n > &  pt1
) 
 

Compare two points for equality.

template<int n>
PointNd<n-1> geom::projectHomogeneous (  const PointNd< n > &  pt  )  [inline]
 

Project an n-dimensional point to the w=1 plane.

template<class Vec>
Vec geom::projectParallel (  const Vec &  v1,
const Vec &  v2
)  [inline]
 

Get the component of v1 that is in the direction of v2.

template<class Vec>
Vec geom::projectPerp (  const Vec &  v1,
const Vec &  v2
)  [inline]
 

Get the component of v1 that is not in the direction of v2.

template<class Arc, class P>
bool geom::projectPointToArc (  const Arc &  arc,
const P &  pt,
double  tol,
P *  pProjPt = 0,
double *  pParam = 0
) 
 

Project the point pt to the arc. Return true if it's within the span of the segment, false if it's outside the span (within tolerance). Optionally return the projection point and a parameter on the arc (in [0, 1] if it's within the arc).

template<class Curve, class Point>
bool geom::projectPointToCurve (  const Curve &  curve,
const Point &  pt,
double  tol,
Point *  pProjPt = 0,
double *  pParam = 0
)  [inline]
 

template<class P>
P geom::projectPointToLine (  const P &  startPt,
const P &  endPt,
const P &  pt
) 
 

Project the point pt to the infinite line through startPt and endPt.

template<class P>
bool geom::projectPointToSegment (  const P &  startPt,
const P &  endPt,
const P &  pt,
double  tol,
P *  pProjPt = 0,
double *  pParam = 0
) 
 

Project the point pt to the segment through startPt and endPt. Return true if it's within the span of the segment, false if it's outside the span (within tolerance). Optionally return the projection point and a parameter on the line (in [0, 1] if it's within the segment).

template<class Curves>
void geom::reverseLoop (  Curves &  curves  )  [inline]
 

template<class T, class P>
void geom::setEndPoint (  T  curve,
const P &  pt
)  [inline]
 

template<class T, class P>
void geom::setStartPoint (  T  curve,
const P &  pt
)  [inline]
 

template<class Curve, class Point>
void geom::tessellateCurve (  const Curve &  curve,
double  tol,
std::vector< Point > *  pPoints
)  [inline]
 

template<class Curves, class Point>
void geom::tessellateLoop (  const Curves &  curves,
double  tol,
std::vector< Point > *  pPoints
)  [inline]
 

template<class CurveIter, class Point>
void geom::tessellateLoop (  CurveIter  begin,
CurveIter  end,
double  tol,
std::vector< Point > *  pPoints
)  [inline]
 

template<class V>
double geom::tripleProduct (  const V &  v0,
const V &  v1,
const V &  v2
)  [inline]
 

Triple product of three points or vectors. tripleProduct(a, b, c) = (a x b) * c = a * (b x c)


Generated on Tue Jan 29 21:37:57 2008 for VoluMill Universal Client by  doxygen 1.4.6