#include <Param2FunctionInt.h>
Inheritance diagram for Go::Param2FunctionInt:
Public Member Functions | |
Param2FunctionInt (boost::shared_ptr< ParamSurface > surf) | |
Constructor. | |
Param2FunctionInt (boost::shared_ptr< ParamSurface > surf, Param2FunctionInt *parent) | |
Constructor. | |
virtual | ~Param2FunctionInt () |
Destructor. | |
virtual void | point (Point &res, const double *par) const |
Evaluate the object in the input parameter. | |
virtual void | point (std::vector< Point > &pt, const double *tpar, int der, const bool *from_right=0, double resolution=1.0e-12) const |
Evaluate the object in the input parameter, with the specified number of derivatives. | |
virtual Param2FunctionInt * | getParam2FunctionInt () |
Return pointer to this object. | |
boost::shared_ptr< ParamSurface > | getParamSurface () |
Return pointer to the parametric surface. | |
boost::shared_ptr< const ParamSurface > | getParamSurface () const |
Return pointer to the parametric surface. | |
boost::shared_ptr< ParamSurface > | getParentParamSurface (RectDomain &domain) |
Return pointer to a subpart of the parent surface of this object. | |
boost::shared_ptr< ParamSurface > | getParentParamSurface () |
Return pointer to the parent-curve of this object. | |
virtual boost::shared_ptr< Param2FunctionInt > | makeIntFunction (boost::shared_ptr< ParamSurface > surf) |
Return an intersection object for the input surface. | |
virtual int | numParams () const |
The number of parameters in the object. | |
boost::shared_ptr< ParamCurve > | getIsoCurve (double param_start, double param_end, double isoval, bool pardir_is_u) const |
Returns the specified isocurve. | |
boost::shared_ptr< ParamCurve > | getConstantParameterCurve (int dir, double par) |
Return a curveOnSurface along the current surface in the given direction and parameter value. | |
virtual void | getLengthAndWiggle (double *length, double *wiggle) |
Return an estimate on the size and wiggle of the object. | |
virtual bool | hasInnerKnots (int pardir) const |
Return true if the object has any inner knots in the specified parameter direction. | |
virtual bool | hasCriticalVals (int pardir) const |
Return true if the object has any critical parameter values in the specified parameter direction. | |
virtual bool | hasCriticalValsOrKnots (int pardir) const |
Return true if the object has any critical parameter values or inner knots in the specified parameter direction. | |
virtual bool | canDivide (int pardir) |
Return true if we are allowed to divide in the specified parameter direction. | |
virtual std::vector< double > | getCriticalVals (int pardir) const |
Return the critical parameter values in the specified direction. | |
virtual std::vector< double > | getInnerKnotVals (int pardir, bool sort=false) const |
Return the inner knot values in the specified direction. | |
virtual std::vector< double > | getCriticalValsAndKnots (int pardir) const |
Return the critical parameter values and inner knots for the object. | |
virtual int | getMeshSize (int dir) |
Return the size of the geometric sample mesh in the specified direction. | |
virtual double | paramFromMesh (int dir, int idx) |
Return the corresponding mesh parameter. | |
virtual std::vector< double >::iterator | getMesh () |
Return the geometric sample mesh for the parametric function. | |
virtual double | startParam (int pardir) const |
Return the start parameter value in the specified direction. | |
virtual double | endParam (int pardir) const |
Return the end parameter in the specified direction. | |
virtual bool | boundaryPoint (const double *par, double eps) const |
Return true if the specified point lies within eps from the boundary. | |
std::vector< double > | getMima () const |
Return the domain of the surface. | |
virtual void | subdivide (int pardir, double par, std::vector< boost::shared_ptr< ParamFunctionInt > > &subdiv_objs, std::vector< boost::shared_ptr< ParamFunctionInt > > &bd_objs) |
Subdivide the object in the specified parameter direction and parameter value. | |
virtual bool | monotone (Point &dir, double tol=1.0e-15) const |
Return true if the surface is monotone in any direction. | |
virtual CompositeBox | compositeBox () const |
Return the CompositeBox for the parametric object. | |
virtual void | getBoundaryObjects (std::vector< boost::shared_ptr< BoundaryFunctionInt > > &bd_objs) |
Return the boundary objects of this object. | |
int | dimension () |
Return the dimension of the geometric space. | |
double | isolateDegPar (int dir, int deg_edge, double threshold) |
Return info on parameter domain which needs special treatment near a degenerated edge. | |
void | assureInRange (int pardir, double &t) |
Make sure that the input parameter lies inside the range of the parametric surface. | |
virtual int | knotIntervalFuzzy (int pardir, double &t, double tol) const |
Return the knot interval for which t lies inside, moving the value t if it lies close to a knot. | |
virtual double | nextSegmentVal (int pardir, double par, bool forward) const |
Return the value of the knot next to the input parameter par. | |
bool | isDegenerate (double epsge, int pardir) |
Return true if the object is degenerate in the specified direction. | |
virtual bool | isDegenerate (double epsge, int pardir, double *par) |
Return true if the object is degenerate in the specified direction and parameter. | |
boost::shared_ptr< ParamSurface > | getSurface () |
Return pointer to the parametric surface. | |
boost::shared_ptr< const ParamSurface > | getSurface () const |
Return pointer to the parametric surface. | |
void | derivs (double u, double v, Point &deriv_u, Point &deriv_v) const |
Return the partial derivatives in the input parameter point. | |
Protected Attributes | |
boost::shared_ptr< ParamSurface > | surf_ |
int | dim_ |
Param2FunctionInt * | parentfunction_ |
std::vector< std::pair< double, int > > | segment_ [2] |
bool | bd_deg_ [4] |
double | deg_tol_ |
RectDomain | domain_ |
int | nmesh_ [2] |
std::vector< double > | mesh_ |
std::vector< Point > | temp_point_array_ |
Definition at line 53 of file Param2FunctionInt.h.
Go::Param2FunctionInt::Param2FunctionInt | ( | boost::shared_ptr< ParamSurface > | surf | ) | [explicit] |
Constructor.
surf | the parametric 1-dimensional surface defining the object. |
Go::Param2FunctionInt::Param2FunctionInt | ( | boost::shared_ptr< ParamSurface > | surf, | |
Param2FunctionInt * | parent | |||
) | [explicit] |
Constructor.
surf | the parametric 1-dimensional surface defining the object. | |
parent | the parent object to this object. |
virtual void Go::Param2FunctionInt::point | ( | Point & | res, | |
const double * | par | |||
) | const [inline, virtual] |
Evaluate the object in the input parameter.
res | the Point to be returned. | |
par | the parameter in which to evaluate. The size of the array should be equal to numParams(). |
Implements Go::ParamObjectInt.
Definition at line 74 of file Param2FunctionInt.h.
References surf_.
virtual void Go::Param2FunctionInt::point | ( | std::vector< Point > & | pt, | |
const double * | tpar, | |||
int | der, | |||
const bool * | from_right = 0 , |
|||
double | resolution = 1.0e-12 | |||
) | const [inline, virtual] |
Evaluate the object in the input parameter, with the specified number of derivatives.
pt | the vector of points to be returned. | |
tpar | the parameter in which to evaluate. The size of the array should be equal to numParams(). | |
der | the number of derivatives to calculate. | |
from_right | if true the evaluation is to be performed from the right side of the parameter value. | |
resolution | tolerance used when determining whether parameters are located at special values of the parameter domain (in particualar: knot values in case of spline objects. |
Implements Go::ParamObjectInt.
Definition at line 88 of file Param2FunctionInt.h.
References surf_.
boost::shared_ptr<ParamSurface> Go::Param2FunctionInt::getParentParamSurface | ( | RectDomain & | domain | ) |
Return pointer to a subpart of the parent surface of this object.
If a parent surface does not exist, return pointer to surface in this object. To reduce numerical noise we go straight to the source (undivided) surface.
boost::shared_ptr<ParamSurface> Go::Param2FunctionInt::getParentParamSurface | ( | ) |
Return pointer to the parent-curve of this object.
If a parent surface does not exist, return pointer to surface in this object. To reduce numerical noise we go straight to the source (undivided) surface.
virtual boost::shared_ptr<Param2FunctionInt> Go::Param2FunctionInt::makeIntFunction | ( | boost::shared_ptr< ParamSurface > | surf | ) | [virtual] |
Return an intersection object for the input surface.
This object is used as the parent for the intersection object.
surf | the parametric surface defining the intersection object. |
Reimplemented in Go::Spline2FunctionInt.
boost::shared_ptr<ParamCurve> Go::Param2FunctionInt::getIsoCurve | ( | double | param_start, | |
double | param_end, | |||
double | isoval, | |||
bool | pardir_is_u | |||
) | const |
Returns the specified isocurve.
param_start | start parameter for the isocurve. | |
param_end | end parameter for the isocurve. | |
isoval | the value for the isoparameter. | |
pardir_is_u | if 'pardir_is_u' is 'true', then the first parameter is the running direction and the second parameter is the isoparameter; vice versa for 'pardir_is_u' equal to 'false'. |
virtual void Go::Param2FunctionInt::getLengthAndWiggle | ( | double * | length, | |
double * | wiggle | |||
) | [virtual] |
Return an estimate on the size and wiggle of the object.
length | the approximative length of the object in the corresponding parameter directions. The size of the array should be equal to numParams(). | |
wiggle | a scalar representing the wiggle of the object in the corresponding parameter directions. The size of the array should be equal to numParams(). |
Implements Go::ParamObjectInt.
virtual bool Go::Param2FunctionInt::hasInnerKnots | ( | int | pardir | ) | const [virtual] |
Return true if the object has any inner knots in the specified parameter direction.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
Reimplemented in Go::Spline2FunctionInt.
virtual bool Go::Param2FunctionInt::hasCriticalVals | ( | int | pardir | ) | const [virtual] |
Return true if the object has any critical parameter values in the specified parameter direction.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
virtual bool Go::Param2FunctionInt::hasCriticalValsOrKnots | ( | int | pardir | ) | const [virtual] |
Return true if the object has any critical parameter values or inner knots in the specified parameter direction.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
Reimplemented in Go::Spline2FunctionInt.
virtual bool Go::Param2FunctionInt::canDivide | ( | int | pardir | ) | [virtual] |
Return true if we are allowed to divide in the specified parameter direction.
pardir | the parameter direction in question. |
Implements Go::ParamObjectInt.
virtual std::vector<double> Go::Param2FunctionInt::getCriticalVals | ( | int | pardir | ) | const [virtual] |
Return the critical parameter values in the specified direction.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
virtual std::vector<double> Go::Param2FunctionInt::getInnerKnotVals | ( | int | pardir, | |
bool | sort = false | |||
) | const [virtual] |
Return the inner knot values in the specified direction.
pardir | the parameter direction in question. Indexing starts at 0. | |
sort | the returned values may be sorted by the function. |
Implements Go::ParamObjectInt.
Reimplemented in Go::Spline2FunctionInt.
virtual std::vector<double> Go::Param2FunctionInt::getCriticalValsAndKnots | ( | int | pardir | ) | const [virtual] |
Return the critical parameter values and inner knots for the object.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
Reimplemented in Go::Spline2FunctionInt.
virtual int Go::Param2FunctionInt::getMeshSize | ( | int | dir | ) | [virtual] |
Return the size of the geometric sample mesh in the specified direction.
dir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamFunctionInt.
virtual double Go::Param2FunctionInt::paramFromMesh | ( | int | dir, | |
int | idx | |||
) | [virtual] |
Return the corresponding mesh parameter.
dir | the parameter direction in question. Indexing starts at 0. | |
idx | the mesh idx in the specified direction. Indexing starts at 0. |
Implements Go::ParamFunctionInt.
virtual double Go::Param2FunctionInt::startParam | ( | int | pardir | ) | const [virtual] |
Return the start parameter value in the specified direction.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
Reimplemented in Go::Spline2FunctionInt.
virtual double Go::Param2FunctionInt::endParam | ( | int | pardir | ) | const [virtual] |
Return the end parameter in the specified direction.
pardir | the parameter direction in question. Indexing starts at 0. |
Implements Go::ParamObjectInt.
Reimplemented in Go::Spline2FunctionInt.
virtual bool Go::Param2FunctionInt::boundaryPoint | ( | const double * | par, | |
double | eps | |||
) | const [virtual] |
Return true if the specified point lies within eps from the boundary.
par | the parameter in which to evaluate. Size of array should be equal to numParams(). | |
eps | the tolerance defining boundary neighbourhood. |
Implements Go::ParamObjectInt.
std::vector<double> Go::Param2FunctionInt::getMima | ( | ) | const |
Return the domain of the surface.
virtual void Go::Param2FunctionInt::subdivide | ( | int | pardir, | |
double | par, | |||
std::vector< boost::shared_ptr< ParamFunctionInt > > & | subdiv_objs, | |||
std::vector< boost::shared_ptr< ParamFunctionInt > > & | bd_objs | |||
) | [virtual] |
Subdivide the object in the specified parameter direction and parameter value.
pardir | direction in which to subdive. Indexing starts at 0. | |
par | parameter in which to subdivide. | |
subdiv_objs | The subparts of this object. Of the same geometric dimension as this object. | |
bd_objs | the boundaries between the returned subdiv_objs. Of geometric dimension 1 less than this object. |
Implements Go::ParamFunctionInt.
virtual bool Go::Param2FunctionInt::monotone | ( | Point & | dir, | |
double | tol = 1.0e-15 | |||
) | const [virtual] |
Return true if the surface is monotone in any direction.
dir | the direction in which the surface is monotone. Pertains only if surface is monotone. |
Implements Go::ParamFunctionInt.
Reimplemented in Go::Spline2FunctionInt.
virtual CompositeBox Go::Param2FunctionInt::compositeBox | ( | ) | const [virtual] |
Return the CompositeBox for the parametric object.
Implements Go::ParamObjectInt.
virtual void Go::Param2FunctionInt::getBoundaryObjects | ( | std::vector< boost::shared_ptr< BoundaryFunctionInt > > & | bd_objs | ) | [virtual] |
Return the boundary objects of this object.
bd_objs | the boundary objects of this object. |
Implements Go::ParamFunctionInt.
Reimplemented in Go::Spline2FunctionInt.
double Go::Param2FunctionInt::isolateDegPar | ( | int | dir, | |
int | deg_edge, | |||
double | threshold | |||
) |
Return info on parameter domain which needs special treatment near a degenerated edge.
dir | the parameter direction in question. Indexing starts at 0. | |
deg_edge | the degenerate edge | |
threshold | a tolerance |
void Go::Param2FunctionInt::assureInRange | ( | int | pardir, | |
double & | t | |||
) |
Make sure that the input parameter lies inside the range of the parametric surface.
Set t equal to umin/vmin if it lies below umin/vmin, or umax/vmax if it lies above umax/vmax.
pardir | the parameter direction in question. Indexing starts at 0. | |
t | the input parameter |
virtual int Go::Param2FunctionInt::knotIntervalFuzzy | ( | int | pardir, | |
double & | t, | |||
double | tol | |||
) | const [virtual] |
Return the knot interval for which t lies inside, moving the value t if it lies close to a knot.
pardir | the parameter direction in question. Indexing starts at 0. | |
t | the parameter value. | |
tol | the parametric tolerance deciding if the input parameter t should be moved. |
Reimplemented in Go::Spline2FunctionInt.
virtual double Go::Param2FunctionInt::nextSegmentVal | ( | int | pardir, | |
double | par, | |||
bool | forward | |||
) | const [virtual] |
Return the value of the knot next to the input parameter par.
pardir | the parameter direction in question. Indexing starts at 0. | |
par | the parameter value | |
forward | if true we return the closest knot to the right, otherwise the closest knot to the left. |
Reimplemented in Go::Spline2FunctionInt.
bool Go::Param2FunctionInt::isDegenerate | ( | double | epsge, | |
int | pardir | |||
) |
Return true if the object is degenerate in the specified direction.
epsge | the geometric tolerance defining degeneracy. | |
pardir | the parameter direction in question. |
virtual bool Go::Param2FunctionInt::isDegenerate | ( | double | epsge, | |
int | pardir, | |||
double * | par | |||
) | [virtual] |
Return true if the object is degenerate in the specified direction and parameter.
epsge | the geometric tolerance defining degeneracy. | |
pardir | the parameter direction in question. | |
par | the parameter in which to evaluate. Size of array should be equal to numParams(). |
Reimplemented from Go::ParamObjectInt.
boost::shared_ptr<ParamSurface> Go::Param2FunctionInt::getSurface | ( | ) | [inline] |
Return pointer to the parametric surface.
Definition at line 337 of file Param2FunctionInt.h.
References surf_.
boost::shared_ptr<const ParamSurface> Go::Param2FunctionInt::getSurface | ( | ) | const [inline] |
Return pointer to the parametric surface.
Definition at line 342 of file Param2FunctionInt.h.
References surf_.
void Go::Param2FunctionInt::derivs | ( | double | u, | |
double | v, | |||
Point & | deriv_u, | |||
Point & | deriv_v | |||
) | const [inline] |
Return the partial derivatives in the input parameter point.
u | the u-parameter | |
v | the v-parameter | |
deriv_u | the partial derivative in the u-direction. | |
deriv_v | the partial derivative in the u-direction. |
Definition at line 350 of file Param2FunctionInt.h.
References surf_, and temp_point_array_.