Go::IntersectionCurve Class Reference
[Intersections]

Object describing the curve that results from an intersection of two geometrical objects. More...

#include <IntersectionCurve.h>

Inheritance diagram for Go::IntersectionCurve:

Go::DegeneratedIntersectionCurve Go::InterpolatedIntersectionCurve Go::IsoparametricIntersectionCurve Go::NonEvaluableIntersectionCurve List of all members.

Public Member Functions

virtual ~IntersectionCurve ()
 Virtual destructor.
virtual boost::shared_ptr<
ParamCurve > 
getCurve () const=0
 Get out a (shared) pointer to a parametric curve that approximates this IntersectionCurve.
virtual boost::shared_ptr<
ParamCurve > 
getParamCurve (int obj_nmb) const =0
 Get out a (shared) pointer to the curve in the parametric plane of the first or second object.
virtual void getParamSpan (double &start, double &end) const=0
 Get the start and end value for the parametric span of the IntersectionCurve.
virtual void evaluateAt (double pval, Point &pos, Point &tan)=0
 Evaluate the IntersectionCurve at parameter value pval.
virtual void refine (const double &pos_tol, const double &angle_tol)=0
 Refine the curve (which means to increase the number of IntersectionPoint s defining it), so that the curve matches a specific positional and angle tolerance.
virtual bool isIsocurve () const=0
 Determine if the IntersectionCurve is in fact representing an isoparametric intersection.
virtual bool isDegenerated () const=0
 Determine if the IntersectionCurve is in fact a degenerated curve (a single point in space).
boost::shared_ptr< IntersectionPointgetGuidePoint (int index) const
 Get one of the specific guidepoints (IntersectionPoint) that define the curve.
virtual bool getGuidePointTangent (boost::shared_ptr< IntersectionPoint > pt, Point &tan, int type=0) const
 Get the tangent of a guidepoint that we know lies on the curve (just using the getTangent() function of the guidepoint can be deceiving, as it is not necessarily unique).
int numGuidePoints () const
 Get number of guide points defining the curve.
void writeIPointsToStream (std::ostream &os) const
 Write the IntersectionPoints defining this IntersectionCurve to stream.

Protected Member Functions

template<class iterator>
 IntersectionCurve (iterator begin, iterator end)

Protected Attributes

std::list< boost::shared_ptr<
IntersectionPoint > > 
ipoints_

Friends

template<class iterator>
boost::shared_ptr< IntersectionCurveconstructIntersectionCurve (const iterator begin, const iterator end)

Detailed Description

Object describing the curve that results from an intersection of two geometrical objects.

Definition at line 92 of file IntersectionCurve.h.


Member Function Documentation

virtual boost::shared_ptr<ParamCurve> Go::IntersectionCurve::getParamCurve ( int  obj_nmb  )  const [pure virtual]

Get out a (shared) pointer to the curve in the parametric plane of the first or second object.

Should only be called when the concerned object is 2-parametric.

Parameters:
obj_nmb should be either 1 or 2, depending on whether you want to get the parametric curve in object 1 or object 2.
Returns:
a shared pointer to a curve that approximates the intersection curve in the parametric domain of the specified object.

Implemented in Go::DegeneratedIntersectionCurve, Go::NonEvaluableIntersectionCurve, Go::IsoparametricIntersectionCurve, and Go::InterpolatedIntersectionCurve.

virtual void Go::IntersectionCurve::getParamSpan ( double &  start,
double &  end 
) const [pure virtual]

Get the start and end value for the parametric span of the IntersectionCurve.

Return values:
start upon function return this variable will contain the start value of the parametric span.
end upon function return this variable will contain the end value of the parametric span.

Implemented in Go::DegeneratedIntersectionCurve, Go::NonEvaluableIntersectionCurve, Go::IsoparametricIntersectionCurve, and Go::InterpolatedIntersectionCurve.

virtual void Go::IntersectionCurve::evaluateAt ( double  pval,
Point &  pos,
Point &  tan 
) [pure virtual]

Evaluate the IntersectionCurve at parameter value pval.

Its position at this parameter value will be returned in pos and its tangent direction will be returned in tan.

Parameters:
pval the parameter value for which to evaluate the IntersectionCurve. It should be within the parametric span (which can be obtained from GetParamSpan().
Return values:
pos the calculated position of the point on the curve at parameter pval.
Parameters:
tan the calculated tangent of the curve at parameter pval.

Implemented in Go::DegeneratedIntersectionCurve, Go::NonEvaluableIntersectionCurve, Go::IsoparametricIntersectionCurve, and Go::InterpolatedIntersectionCurve.

virtual void Go::IntersectionCurve::refine ( const double &  pos_tol,
const double &  angle_tol 
) [pure virtual]

Refine the curve (which means to increase the number of IntersectionPoint s defining it), so that the curve matches a specific positional and angle tolerance.

Parameters:
pos_tol the positional tolerance that the curve should match after refinement.
angle_tol the angular tolerance that the tangent of the curve should match after refinement.

Implemented in Go::DegeneratedIntersectionCurve, Go::NonEvaluableIntersectionCurve, Go::IsoparametricIntersectionCurve, and Go::InterpolatedIntersectionCurve.

virtual bool Go::IntersectionCurve::isIsocurve (  )  const [pure virtual]

Determine if the IntersectionCurve is in fact representing an isoparametric intersection.

Returns:
'true' if the IntersectionCurve is part of an isocurve for one of the objects, 'false' otherwise.

Implemented in Go::DegeneratedIntersectionCurve, Go::NonEvaluableIntersectionCurve, Go::IsoparametricIntersectionCurve, and Go::InterpolatedIntersectionCurve.

virtual bool Go::IntersectionCurve::isDegenerated (  )  const [pure virtual]

Determine if the IntersectionCurve is in fact a degenerated curve (a single point in space).

Returns:
'true' if the IntersectionCurve is degenerated. 'false' otherwise.

Implemented in Go::DegeneratedIntersectionCurve, Go::NonEvaluableIntersectionCurve, Go::IsoparametricIntersectionCurve, and Go::InterpolatedIntersectionCurve.

boost::shared_ptr<IntersectionPoint> Go::IntersectionCurve::getGuidePoint ( int  index  )  const

Get one of the specific guidepoints (IntersectionPoint) that define the curve.

Parameters:
index the index of the requested IntersectionPoint(from 0 and up to the number of defining IntersectionPoint s - 1). To find out how many IntersectionPoint s participate in the definition of the curve, use the numGuidePoints() function.
Returns:
a shared pointer to the requested IntersectionPoint.

virtual bool Go::IntersectionCurve::getGuidePointTangent ( boost::shared_ptr< IntersectionPoint pt,
Point &  tan,
int  type = 0 
) const [virtual]

Get the tangent of a guidepoint that we know lies on the curve (just using the getTangent() function of the guidepoint can be deceiving, as it is not necessarily unique).

Parameters:
pt shared pointer to the guidepoint. It is supposed to be part of the definition of the curve.
type specifies what kind of tangent the user wants. '1' means the parameter plane tangent for the first object. '2' means the parameter plane tangent for the second object. Other values of 'type' means the tangent in 3D space.
Return values:
tan the requested tangent
Returns:
'true' if a tangent was found (i.e. pt was indeed a guidepoint of the IntersectionCurve). In the opposite case, 'false' is returned.

Reimplemented in Go::InterpolatedIntersectionCurve.

int Go::IntersectionCurve::numGuidePoints (  )  const [inline]

Get number of guide points defining the curve.

Returns:
the number of guide points currently defining the curve (may increase if the 'refine()' function is run).

Definition at line 186 of file IntersectionCurve.h.

References ipoints_.

void Go::IntersectionCurve::writeIPointsToStream ( std::ostream &  os  )  const

Write the IntersectionPoints defining this IntersectionCurve to stream.

Parameters:
os output stream


The documentation for this class was generated from the following file:
Generated on Fri Nov 23 12:24:33 2007 for GoTools Intersections Library by  doxygen 1.5.1