Go::CurveOnSurface Class Reference
['geometry' - a spline library]

Missing doxygen documentation class description. More...

#include <CurveOnSurface.h>

Inheritance diagram for Go::CurveOnSurface:

Go::ParamCurve Go::GeomObject Go::Streamable List of all members.

Public Member Functions

 CurveOnSurface ()
 Define an empty CurveOnSurface that can be assigned or read() into.
 CurveOnSurface (boost::shared_ptr< ParamSurface > surf, boost::shared_ptr< ParamCurve > curve, bool preferparameter)
 Construct a CurveOnSurface by specifying the surface and either a space curve or a curve in the parameter plane.
 CurveOnSurface (boost::shared_ptr< ParamSurface > surf, boost::shared_ptr< ParamCurve > pcurve, boost::shared_ptr< ParamCurve > spacecurve, bool preferparameter)
 Construct a CurveOnSurface by specifying the surface, the space curve and the curve in the parameter plane.
 CurveOnSurface (const CurveOnSurface &surface_curve)
 Copy constructor.
CurveOnSurfaceoperator= (const CurveOnSurface &other)
 Assignment operator.
virtual ~CurveOnSurface ()
 Destructor.
virtual void read (std::istream &is)
 read object from stream
virtual void write (std::ostream &os) const
 write object to stream
virtual BoundingBox boundingBox () const
 Return the object's bounding box.
virtual DirectionCone directionCone () const
 Creates a DirectionCone which covers all tangent directions of this curve.
virtual int dimension () const
 Return the dimension of the space in which the object lies (usually 2 or 3).
virtual ClassType instanceType () const
 Return the class type identifier of a given, derived instance of GeomObject.
virtual CurveOnSurfaceclone () const
 The clone-function is herited from GeomObject, but overridden here to get a covariant return type (for those compilers that allow this).
virtual void point (Point &pt, double tpar) const
 Evaluate the curve's position at a given parameter.
virtual void point (std::vector< Point > &pts, double tpar, int derivs, bool from_right=true) const
 Inherited from ParamCurve.
virtual double startparam () const
 Query the start parameter of the curve.
virtual double endparam () const
 Query the end parameter of the curve.
virtual void reverseParameterDirection (bool switchparam=false)
 Set the parameter direction of the curve.
virtual SplineCurvegeometryCurve ()
 If the definition of this ParamCurve contains a SplineCurve describing its spatial shape, then this function will return a pointer to this SplineCurve.
virtual bool isDegenerate (double degenerate_epsilon)
 Query whether the curve is degenerate (collapsed into a single point).
virtual CurveOnSurfacesubCurve (double from_par, double to_par, double fuzzy=DEFAULT_PARAMETER_EPSILON) const
 Returns a curve which is a part of this curve.
virtual void closestPoint (const Point &pt, double tmin, double tmax, double &clo_t, Point &clo_pt, double &clo_dist, double const *seed=0) const
 Compute the closest point from an interval of this curve to a specified point.
virtual void appendCurve (ParamCurve *cv, bool reparam=true)
 append a curve to this curve, with eventual reparametrization NB: This virtual member function currently only works for SplineCurves and CurveOnSurfaces.
virtual void appendCurve (ParamCurve *cv, int continuity, double &dist, bool reparam=true)
 append a curve to this curve, with eventual reparmetrization
void setUnderlyingSurface (boost::shared_ptr< ParamSurface > surface)
 Set the underlying surface to the one pointed to by the argument.
virtual double nextSegmentVal (double par, bool forward, double tol) const
 Inherited from ParamCurve.
boost::shared_ptr< ParamSurfaceunderlyingSurface ()
 Get a shared pointer to the underlying surface.
boost::shared_ptr< ParamCurveparameterCurve ()
 Get a shared pointer to the curve in the parameter domain.
boost::shared_ptr< ParamCurvespaceCurve ()
 Get a shared pointer to the space curve.
boost::shared_ptr< const ParamSurfaceunderlyingSurface () const
 Get a constant, shared pointer to the underlying surface.
boost::shared_ptr< const ParamCurveparameterCurve () const
 Get a constant, shared pointer to the curve in the parameter domain.
boost::shared_ptr< const ParamCurvespaceCurve () const
 Get a constant, shared pointer to the space curve.
bool parPref () const
 Query whether the parameter curve or the space curve is prefered for computation in this object.
RectDomain containingDomain () const
 Get the rectangle enclosing the underlying surface's parametric domain.

Static Public Member Functions

static ClassType classType ()
 Return the class type identifier of a given class derived from GeomObject.

Detailed Description

Missing doxygen documentation class description.

Definition at line 53 of file CurveOnSurface.h.


Constructor & Destructor Documentation

Go::CurveOnSurface::CurveOnSurface ( boost::shared_ptr< ParamSurface surf,
boost::shared_ptr< ParamCurve curve,
bool  preferparameter 
)

Construct a CurveOnSurface by specifying the surface and either a space curve or a curve in the parameter plane.

Does not clone any of the input, just sets (smart) pointers.

Parameters:
surf pointer to the underlying surface
curve pointer to the curve specifying the CurveOnSurface. This curve may either be in the parametric domain of the surface (2D curve), or a space curve that the user has assured to be coincident with the surface. 'preferparameter' specifies which kind of curve this is.
preferparameter if this is set to 'true', then 'curve' is assumed to be a curve in the parametric domain of the surface. Otherwise, it is assumed to be a space (3D) curve.

Go::CurveOnSurface::CurveOnSurface ( boost::shared_ptr< ParamSurface surf,
boost::shared_ptr< ParamCurve pcurve,
boost::shared_ptr< ParamCurve spacecurve,
bool  preferparameter 
)

Construct a CurveOnSurface by specifying the surface, the space curve and the curve in the parameter plane.

The arguments are checked for consistency, and if they appear incoherent, an exception will be thrown. Does not clone any of the input, just sets (smart) pointers.

Parameters:
surf pointer to the underlying surface
pcurve pointer to the curve representing the CurveOnSurface in the parametric domain of the surface.
spacecurve pointer to the curve that is the spatial (3D) representation of the CurveOnSurface.
preferparameter specify whether the parametric curve or the space curve are preferred for internal computations.

Go::CurveOnSurface::CurveOnSurface ( const CurveOnSurface surface_curve  ) 

Copy constructor.

The copy constructor will not clone() the underlying surface, but it will clone() both the parametric and the spatial curve.

Parameters:
surface_curve the CurveOnSurface to copy into 'this' CurveOnSurface.

virtual Go::CurveOnSurface::~CurveOnSurface (  )  [virtual]

Destructor.

Trivial because memory is managed by boost::shared_ptr.


Member Function Documentation

CurveOnSurface& Go::CurveOnSurface::operator= ( const CurveOnSurface other  ) 

Assignment operator.

Like the copy constructor, the assignment operator clone()s the curves, and not the surface.

Parameters:
other the CurveOnSurface to copy into 'this' CurveOnSurface.

virtual void Go::CurveOnSurface::read ( std::istream &  is  )  [virtual]

read object from stream

Parameters:
is stream from which object is read

Implements Go::Streamable.

virtual void Go::CurveOnSurface::write ( std::ostream &  os  )  const [virtual]

write object to stream

Parameters:
os stream to which object is written

Implements Go::Streamable.

virtual DirectionCone Go::CurveOnSurface::directionCone (  )  const [virtual]

Creates a DirectionCone which covers all tangent directions of this curve.

Returns:
the smallest DirectionCone containing all tangent directions of this curve.

Implements Go::ParamCurve.

virtual void Go::CurveOnSurface::point ( Point pt,
double  tpar 
) const [virtual]

Evaluate the curve's position at a given parameter.

Parameters:
pt the evaluated position will be written to this Point
tpar the parameter for which we wish to evaluate the curve

Implements Go::ParamCurve.

virtual void Go::CurveOnSurface::point ( std::vector< Point > &  pts,
double  tpar,
int  derivs,
bool  from_right = true 
) const [virtual]

Inherited from ParamCurve.

Only works for 'derivs' = 0 or 1.

See also:
ParamCurve::point()

Implements Go::ParamCurve.

virtual double Go::CurveOnSurface::startparam (  )  const [virtual]

Query the start parameter of the curve.

Returns:
the curve's start parameter

Implements Go::ParamCurve.

virtual double Go::CurveOnSurface::endparam (  )  const [virtual]

Query the end parameter of the curve.

Returns:
the curve's end parameter

Implements Go::ParamCurve.

virtual void Go::CurveOnSurface::reverseParameterDirection ( bool  switchparam = false  )  [virtual]

Set the parameter direction of the curve.

The curve's parameter interval will always remain constant, but by flipping the parameter direction, the curve will be traced the opposite way when moving a parameter over the parameter interval.

Parameters:
switchparam if true, and the curve is 2D, the x and y coordinates should be swapped. This is used when turning the orientation of bounded (trimmed) surfaces.

Implements Go::ParamCurve.

virtual SplineCurve* Go::CurveOnSurface::geometryCurve (  )  [virtual]

If the definition of this ParamCurve contains a SplineCurve describing its spatial shape, then this function will return a pointer to this SplineCurve.

Otherwise it will return a null pointer.

Returns:
a pointer to the internal SplineCurve, if it exists. Null pointer otherwise.

Implements Go::ParamCurve.

virtual bool Go::CurveOnSurface::isDegenerate ( double  degenerate_epsilon  )  [virtual]

Query whether the curve is degenerate (collapsed into a single point).

Parameters:
degenerate_epsilon the tolerance used in determine whether the curve is degenerate. A curve is considered degenerate if its total length is shorter than this value.
Returns:
'true' if the curve is degenerate, 'false' otherwise.

Implements Go::ParamCurve.

virtual CurveOnSurface* Go::CurveOnSurface::subCurve ( double  from_par,
double  to_par,
double  fuzzy = DEFAULT_PARAMETER_EPSILON 
) const [virtual]

Returns a curve which is a part of this curve.

The result is NEWed, so the user is responsible for deleting it. NB: This function only work for derived classes of ParamCurve, namely those who are spline-based.

Parameters:
from_par start value of parameter interval that will define the subcurve
to_par end value of parameter interval that will define the subcurve
fuzzy since subCurve works on those curves who are spline-based, this tolerance defines how close the start and end parameter must be to an existing knot in order to be considered on the knot.
Returns:
a pointer to a new subcurve which represents the part of the curve between 'from_par' and 'to_par'. It will be spline-based and have a k-regular knotvector. The user is responsible for deleting this subcurve when it is no longer needed.

Implements Go::ParamCurve.

virtual void Go::CurveOnSurface::closestPoint ( const Point pt,
double  tmin,
double  tmax,
double &  clo_t,
Point clo_pt,
double &  clo_dist,
double const *  seed = 0 
) const [virtual]

Compute the closest point from an interval of this curve to a specified point.

Parameters:
pt point we want to find the closest point to
tmin start parameter of search interval
tmax end parameter of search interval
clo_t upon function return, 'clo_t' will contain the parameter value of the closest point found.
clo_pt upon function return, 'clo_pt' will contain the position of the closest point found.
clo_dist upon function return, 'clo_dist' will containn the distance between 'pt' and the closest point found.
seed pointer to initial guess value, provided by the user (can be 0, for which the algorithm will determine a (hopefully) reasonable choice).

Implements Go::ParamCurve.

virtual void Go::CurveOnSurface::appendCurve ( ParamCurve cv,
bool  reparam = true 
) [virtual]

append a curve to this curve, with eventual reparametrization NB: This virtual member function currently only works for SplineCurves and CurveOnSurfaces.

Moreover, 'this' curve and the 'cv' curve must be of the same type.

Parameters:
cv the curve to append to 'this' curve.
reparam specify whether or not there should be reparametrization

Implements Go::ParamCurve.

virtual void Go::CurveOnSurface::appendCurve ( ParamCurve cv,
int  continuity,
double &  dist,
bool  reparam = true 
) [virtual]

append a curve to this curve, with eventual reparmetrization

Parameters:
cv the curve to append to 'this' curve.
continuity the required continuity at the transition. Can be G^(-1) and upwards.
dist a measure of the local distorsion around the transition in order to achieve the specified continuity.
reparam specify whether or not there should be reparametrization

Implements Go::ParamCurve.

void Go::CurveOnSurface::setUnderlyingSurface ( boost::shared_ptr< ParamSurface surface  )  [inline]

Set the underlying surface to the one pointed to by the argument.

Parameters:
surface the pointer to the surface we will set as underlying for this CurveOnSurface.

Definition at line 193 of file CurveOnSurface.h.

virtual double Go::CurveOnSurface::nextSegmentVal ( double  par,
bool  forward,
double  tol 
) const [virtual]

Inherited from ParamCurve.

If the parametric curve is set to be the 'prefered' one, this function will return the next segment value for the parametric curve; otherwise it will return the next segment value for the spatial 3D curve. See also ParamCurve::nextSegmentVal()

Reimplemented from Go::ParamCurve.

boost::shared_ptr<ParamSurface> Go::CurveOnSurface::underlyingSurface (  )  [inline]

Get a shared pointer to the underlying surface.

Returns:
a shared pointer to the underlying surface

Definition at line 206 of file CurveOnSurface.h.

boost::shared_ptr<ParamCurve> Go::CurveOnSurface::parameterCurve (  )  [inline]

Get a shared pointer to the curve in the parameter domain.

Returns:
a shared pointer to the curve in the parameter domain

Definition at line 211 of file CurveOnSurface.h.

boost::shared_ptr<ParamCurve> Go::CurveOnSurface::spaceCurve (  )  [inline]

Get a shared pointer to the space curve.

Returns:
a shared pointer to the space curve.

Definition at line 216 of file CurveOnSurface.h.

boost::shared_ptr<const ParamSurface> Go::CurveOnSurface::underlyingSurface (  )  const [inline]

Get a constant, shared pointer to the underlying surface.

Returns:
a const-pointer to the underlying surface

Definition at line 221 of file CurveOnSurface.h.

boost::shared_ptr<const ParamCurve> Go::CurveOnSurface::parameterCurve (  )  const [inline]

Get a constant, shared pointer to the curve in the parameter domain.

Returns:
a const-pointer to the curve in the parameter domain.

Definition at line 226 of file CurveOnSurface.h.

boost::shared_ptr<const ParamCurve> Go::CurveOnSurface::spaceCurve (  )  const [inline]

Get a constant, shared pointer to the space curve.

Returns:
a const-shared pointer to the space curve.

Definition at line 231 of file CurveOnSurface.h.

RectDomain Go::CurveOnSurface::containingDomain (  )  const

Get the rectangle enclosing the underlying surface's parametric domain.

Returns:
the RectDomain for the underlying surface.


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 14:48:18 2007 for GoTools Core Library by  doxygen 1.5.1