Abstract

These types define the general function contract and common support for input and output vectors, compound functions, and transformed functions.

class analyticFunction : public dtOO::labelHandling, public dtOO::renderInterface

Abstract base class for analytic mappings between vector spaces.

An analytic function maps an input vector of type aFX to an output vector of type aFY. Derived classes define the input and output dimensions, input bounds, evaluation, cloning, and transformation behavior.

Input percent coordinates are normalized to [0, 1] in each direction. Convenience overloads evaluate one-, two-, and three-dimensional functions and return their output components as standard vectors.

Subclassed by dtOO::scaFunction, dtOO::vec2dFunction, dtOO::vec3dFunction

Public Functions

virtual analyticFunction *clone(void) const = 0

Create a deep copy of this function.

virtual analyticFunction *weakClone(void) const

Create a copy that may share immutable internal data with this function.

virtual analyticFunction *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual analyticFunction *create(void) const = 0

Create a default instance of the concrete function type.

virtual void dump(void) const

Write the label, dynamic class name, and textual representation to the log.

virtual std::string dumpToString(void) const

Return a textual representation of this function.

virtual aFY Y(aFX const &xx) const = 0

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual dtInt xDim(void) const = 0

Return the input-space dimension.

virtual dtInt yDim(void) const = 0

Return the output-space dimension.

virtual dtReal xMin(dtInt const &dir) const = 0

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const = 0

Return the upper bound of an input direction.

virtual aFX xMin(void) const

Return the lower bounds of all input directions.

virtual aFX xMax(void) const

Return the upper bounds of all input directions.

virtual aFX x_percent(aFX const &xx) const

Convert normalized input coordinates to native coordinates.

Parameters:

xx – One percent coordinate in [0, 1] per input direction.

Returns:

Native input coordinates.

virtual aFX percent_x(aFX const &xx) const

Convert native input coordinates to normalized coordinates.

Parameters:

xx – Native input coordinates.

Returns:

One percent coordinate in [0, 1] per input direction.

virtual aFX invY(aFY const &yy) const

Numerically invert the function for an output value.

Parameters:

yy – Target output vector.

Throws:

Exception – if the numerical minimization does not converge.

Returns:

Native input coordinates that produce the target output.

virtual bool isCompound(void) const

Return whether this function consists of multiple component functions.

virtual vectorHandling<analyticFunction*> const &vecRef(void) const

Return the component functions of a compound function.

virtual std::map<int, dtInt> const &mapRef(void) const

Return the mapping between compound-function and component indices.

virtual bool isTransformed(void) const

Return whether this function represents a transformed function.

virtual std::pair<aFY, aFY> yBoundingBox(void) const

Return lower and upper output bounds, if provided by the implementation.

std::vector<dtReal> const operator()(dtReal const &xx) const

Evaluate a one-dimensional function.

Throws:

Exception – if xDim() is not one.

std::vector<dtReal> const operator()(dtReal const &xx, dtReal const &yy) const

Evaluate a two-dimensional function.

Throws:

Exception – if xDim() is not two.

std::vector<dtReal> const operator()(dtReal const &xx, dtReal const &yy, dtReal const &zz) const

Evaluate a three-dimensional function.

Throws:

Exception – if xDim() is not three.

Public Static Functions

static aFX aFXZeroD(void)

Create an empty input vector.

static aFX aFXOneD(dtReal const &x0)

Create a one-dimensional input vector.

static aFX aFXTwoD(dtReal const &x0, dtReal const &x1)

Create a two-dimensional input vector.

static aFX aFXThreeD(dtReal const &x0, dtReal const &x1, dtReal const &x2)

Create a three-dimensional input vector.

static aFX aFXTwoD(dtPoint2 const &pp)

Convert a 2D point to a two-dimensional input vector.

static aFX aFXThreeD(dtPoint3 const &pp)

Convert a 3D point to a three-dimensional input vector.

static aFY aFYZeroD(void)

Create an empty output vector.

static aFY aFYOneD(dtReal const &x0)

Create a one-dimensional output vector.

static aFY aFYTwoD(dtReal const &x0, dtReal const &x1)

Create a two-dimensional output vector.

static aFY aFYThreeD(dtReal const &x0, dtReal const &x1, dtReal const &x2)

Create a three-dimensional output vector.

static aFY aFYTwoD(dtPoint2 const &pp)

Convert a 2D point to a two-dimensional output vector.

static aFY aFYThreeD(dtPoint3 const &pp)

Convert a 3D point to a three-dimensional output vector.

static aFY aFY_aFX(aFX const &xx)

Convert an input vector to an output vector with identical components.

static aFX aFX_aFY(aFY const &yy)

Convert an output vector to an input vector with identical components.

static dtReal distance(aFX const &x0, aFX const &x1)

Return the Euclidean distance between equally sized input vectors.

class aFX : public std::vector<dtReal>

Input-coordinate vector used by analytic functions.

Public Functions

std::vector<dtReal> toStdVector(void)

Return the coordinates as a standard vector.

class aFY : public std::vector<dtReal>

Output-value vector returned by analytic functions.

Public Functions

std::vector<dtReal> stdVector(void)

Return the values as a standard vector.

template<typename funT, typename invFunT>
class analyticFunctionCombination : public funT

Combines a forward function with a separate function used for inversion.

Public Functions

virtual aFY Y(aFX const &xx) const

Evaluate the owned forward function.

virtual aFX invY(aFY const &yy) const

Invert through the owned inverse function.

template<typename funT>
class analyticFunctionCompound : public funT

Adds tagged component-function ownership to an analytic function type.

Public Functions

void trojanHorse(vectorHandling<analyticFunction*> const &vec, std::map<int, dtInt> const &pos_tag)

Adopt externally owned components instead of cloning them.

The caller retains ownership of the supplied components.

funT const &component(dtInt const &pos) const

Return the component stored at a positional index.

funT &addComponent(funT const &toAdd)

Clone and append a component, assigning the next available tag.

funT const &componentFromTag(dtInt const &tag) const

Return the component associated with a tag.

bool isTrojan(void) const

Return whether this instance references externally owned components.

template<typename funT>
class analyticFunctionCompoundTrojanHorse

Non-owning mutator for the components of a compound analytic function.

Public Functions

funT *component(dtInt const &pos) const

Return the component at a positional index.

funT *addComponent(funT const *const toAdd)

Clone and append a component using the next available tag.

funT *addComponent(funT const *const toAdd, dtInt const &tag)

Clone and append a component with an explicit, unique tag.

funT *componentFromTag(dtInt const &tag) const

Return the component associated with a tag.

template<typename funT>
class analyticFunctionTransformed : public funT

Decorates a function by applying a transformer to two- or three-dimensional outputs.

Public Functions

virtual aFY Y(aFX const &xx) const

Evaluate the wrapped function and transform its output.

virtual aFX invY(aFY const &yy) const

Retract an output through the transformer before inversion.

void setTransformer(dtTransformer const *const dtT)

Clone and replace the transformer used by this decorator.

These classes define scalar, two-component vector, and three-component vector output interfaces. The dimension-specific classes define the one-, two-, and three-dimensional input interfaces from which concrete functions derive.

class scaFunction : public dtOO::analyticFunction

Base class for analytic functions with a scalar output.

Subclassed by dtOO::scaOneD, dtOO::scaThreeD, dtOO::scaTwoD

Public Functions

virtual scaFunction *clone(void) const = 0

Create a deep copy of this function.

virtual dtInt yDim(void) const

Return the output-space dimension.

virtual aFY Y(aFX const &xx) const

Evaluate the scalar function and package the value in an aFY vector.

class scaOneD : public dtOO::scaFunction

Function with scalar argument and scalar return value.

An instance of scaOneD is defined in the range [ _xxMin, _xxMax ]. This class implements functions for handling scalar arguments.

Subclassed by dtOO::scaCurve2dOneD, dtOO::scaLinearOneD, dtOO::scaMuParserOneD, dtOO::scaOneDPolyInterface

Public Functions

virtual scaOneD *clone(void) const = 0

Create a deep copy of this function.

virtual scaOneD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual scaOneD *create(void) const = 0

Create a default instance of the concrete function type.

virtual dtReal YFloat(aFX const &xx) const

Function value.

Parameters:

xx – Argument.

Throws:

dtOO::eGeneral – If dimension of xx>1.

virtual dtReal invYFloat(dtReal const &yy) const

Inverse function.

Parameters:

yy – Function value.

dtReal YFloatPercent(dtReal const &xP) const

Function value at argument given in percent.

Parameters:

xP – Argument given in percent.

void setMinMax(dtReal const min, dtReal const max)

Define argument range of function.

Parameters:
  • min – Minimum argument value.

  • max – Maximum argument value.

void setMin(dtReal const min)

Define minimum argument bound of function.

Parameters:

min – Minimum argument value.

void setMax(dtReal const max)

Define maximum argument bound of function.

Parameters:

max – Maximum argument value.

virtual dtInt xDim(void) const

Return dimension of argument.

virtual dtReal xMin(dtInt const &dir) const

Return minimal argument bound of function.

virtual dtReal xMax(dtInt const &dir) const

Return maximal argument bound of function.

dtReal getLength(void) const

Compute length of function.

Method approximates the length of the function f(x). This corresponds to:

\[ \int_{xMin}^{xMax} f dx \]
Integration is performed as numerical integration with a step size of +1.0E-08.

dtReal x_percent(dtReal const &xx) const

Convert function argument from percent to current range.

Parameters:

xx – Percent value of function argument range.

dtReal percent_x(dtReal const &xx) const

Convert function argument from current range to percent.

Parameters:

xx – Current value of function argument range.

dtReal DYFloat(dtReal const &xx) const

First derivative of function.

Derivative is calculated numerically by an approximation.

Parameters:

xx – Function argument value.

class scaOneDPolyInterface : public dtOO::scaOneD

Interface for scalar one-dimensional functions parameterized by degrees of freedom.

Subclassed by dtOO::sca3PPointsBSplineOneD, dtOO::scaTanhGradingOneD, dtOO::scaTanhUnitGradingOneD

Public Functions

virtual scaOneDPolyInterface *clone(void) const = 0

Create a deep copy of this function.

virtual dtInt nDOF(void) const = 0

Return the number of adjustable degrees of freedom.

virtual void setDOF(std::vector<dtReal> const value) = 0

Set all adjustable degrees of freedom.

class scaTwoD : public dtOO::scaFunction

Base class for scalar functions of two independent variables.

Subclassed by dtOO::scaMuParserTwoD

Public Functions

virtual scaTwoD *clone(void) const = 0

Create a deep copy of this function.

virtual scaTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual scaTwoD *create(void) const = 0

Create a default instance of the concrete function type.

virtual dtReal YFloat(aFX const &xx) const

Evaluate from a two-coordinate input vector.

dtReal YFloatPercent(dtReal const &xP0, dtReal const &xP1) const

Evaluate at normalized coordinates in [0, 1].

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

std::vector<dtReal> DYFloat(aFX const &xx) const

Numerically compute the partial derivatives at an input vector.

virtual aFX percent_x(aFX const &xx) const

Convert native input coordinates to normalized coordinates.

Parameters:

xx – Native input coordinates.

Returns:

One percent coordinate in [0, 1] per input direction.

virtual aFX x_percent(aFX const &xx) const

Convert normalized input coordinates to native coordinates.

Parameters:

xx – One percent coordinate in [0, 1] per input direction.

Returns:

Native input coordinates.

class scaThreeD : public dtOO::scaFunction

Base class for scalar functions of three independent variables.

Subclassed by dtOO::scaMuParserThreeD

Public Functions

virtual scaThreeD *clone(void) const = 0

Create a deep copy of this function.

virtual scaThreeD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual scaThreeD *create(void) const = 0

Create a default instance of the concrete function type.

virtual dtReal YFloat(aFX const &xx) const

Evaluate from a three-coordinate input vector.

dtReal YFloatPercent(dtReal const &xP0, dtReal const &xP1, dtReal const &xP2) const

Evaluate at normalized coordinates in [0, 1].

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

std::vector<dtReal> DYFloat(aFX const &xx) const

Numerically compute the partial derivatives at an input vector.

virtual aFX percent_x(aFX const &xx) const

Convert native input coordinates to normalized coordinates.

Parameters:

xx – Native input coordinates.

Returns:

One percent coordinate in [0, 1] per input direction.

virtual aFX x_percent(aFX const &xx) const

Convert normalized input coordinates to native coordinates.

Parameters:

xx – One percent coordinate in [0, 1] per input direction.

Returns:

Native input coordinates.

class vec2dFunction : public dtOO::analyticFunction

Base class for analytic functions that return two-dimensional points.

Subclassed by dtOO::vec2dOneD, dtOO::vec2dTwoD

Public Functions

virtual vec2dFunction *clone(void) const = 0

Create a deep copy of this function.

virtual dtInt yDim(void) const

Return the output-space dimension.

dtPoint2 YdtPoint2(aFX const &xx) const

Evaluate and convert the result to a two-dimensional point.

class vec2dOneD : public dtOO::vec2dFunction

Base class for parameterized curves in two-dimensional space.

Subclassed by dtOO::vec2dCurve2dOneD

Public Functions

virtual vec2dOneD *clone(void) const = 0

Create a deep copy of this function.

virtual vec2dOneD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual vec2dOneD *create(void) const = 0

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

virtual dtVector2 DYdtVector2(dtReal const &xx) const

Numerically compute the curve tangent at a native parameter.

dtVector2 unitNdtVector2(dtReal const &xx) const

Return the unit normal at a native parameter.

dtVector2 unitNdtVector2Percent(dtReal const &xx) const

Return the unit normal at a normalized parameter.

dtPoint2 YdtPoint2Percent(dtReal const &xx) const

Evaluate the curve at a normalized parameter.

dtReal length(dtReal const &x1) const

Return the arc length from the minimum parameter through x1.

dtReal length(void) const

Return the arc length over the full parameter interval.

class vec2dTwoD : public dtOO::vec2dFunction

Base class for two-parameter mappings into two-dimensional space.

Subclassed by dtOO::vec2dBiLinearTwoD, dtOO::vec2dMuParserTwoD, dtOO::vec2dMultiBiLinearTwoD, dtOO::vec2dSurface2dTwoD

Public Functions

virtual vec2dTwoD *clone(void) const = 0

Create a deep copy of this function.

virtual vec2dTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual vec2dTwoD *create(void) const = 0

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const = 0

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

virtual std::vector<dtVector2> DYdtVector2(aFX const &xx) const

Numerically compute the two partial derivative vectors.

dtPoint2 YdtPoint2Percent(aFX const &xx) const

Evaluate the mapping at normalized input coordinates.

virtual aFX percent_x(aFX const &xx) const

Convert native input coordinates to normalized coordinates.

Parameters:

xx – Native input coordinates.

Returns:

One percent coordinate in [0, 1] per input direction.

virtual aFX x_percent(aFX const &xx) const

Convert normalized input coordinates to native coordinates.

Parameters:

xx – One percent coordinate in [0, 1] per input direction.

Returns:

Native input coordinates.

class vec3dFunction : public dtOO::analyticFunction

Base class for analytic functions that return three-dimensional points.

Subclassed by dtOO::vec3dOneD, dtOO::vec3dThreeD, dtOO::vec3dTwoD

Public Functions

virtual vec3dFunction *clone(void) const = 0

Create a deep copy of this function.

virtual dtInt yDim(void) const

Return the output-space dimension.

dtPoint3 YdtPoint3(aFX const &xx) const

Evaluate and convert the result to a three-dimensional point.

class vec3dOneD : public dtOO::vec3dFunction

Base class for parameterized curves in three-dimensional space.

Subclassed by dtOO::vec3dCurve2dInSurfaceOneD, dtOO::vec3dCurveOneD, dtOO::vec3dMuParserOneD

Public Functions

virtual vec3dOneD *clone(void) const = 0

Create a deep copy of this function.

virtual vec3dOneD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual vec3dOneD *create(void) const = 0

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const = 0

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

virtual dtVector3 DYdtVector3(dtReal const &xx) const

Numerically compute the curve tangent at a native parameter.

virtual dtVector3 DYdtVector3Percent(dtReal const &xx) const

Numerically compute the curve tangent at a normalized parameter.

dtPoint3 YdtPoint3Percent(dtReal const &xx) const

Evaluate the curve at a normalized parameter.

dtReal length(dtReal const &x1) const

Return the arc length from the minimum parameter through x1.

dtReal length(void) const

Return the arc length over the full parameter interval.

dtReal operator%(const dtReal &percent) const

Return the native parameter corresponding to a normalized value.

class vec3dTwoD : public dtOO::vec3dFunction

Base class for two-parameter mappings into three-dimensional space.

Subclassed by dtOO::vec3dBiLinearTwoD, dtOO::vec3dMuParserTwoD, dtOO::vec3dSurfaceTwoD, dtOO::vec3dThickedTwoD

Public Functions

virtual vec3dTwoD *clone(void) const = 0

Create a deep copy of this function.

virtual vec3dTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual vec3dTwoD *create(void) const = 0

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const = 0

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

virtual std::vector<dtVector3> DYdtVector3(aFX const &xx) const

Numerically compute the two partial derivative vectors.

dtVector3 unitNdtVector3(aFX const &xx) const

Return the unit surface normal at native input coordinates.

dtVector3 unitNdtVector3Percent(aFX const &xx) const

Return the unit surface normal at normalized input coordinates.

dtPoint3 YdtPoint3Percent(aFX const &xx) const

Evaluate the mapping at normalized input coordinates.

aFX operator%(const aFX &percent) const

Convert normalized coordinates to native input coordinates.

virtual aFX percent_x(aFX const &xx) const

Convert native input coordinates to normalized coordinates.

Parameters:

xx – Native input coordinates.

Returns:

One percent coordinate in [0, 1] per input direction.

virtual aFX x_percent(aFX const &xx) const

Convert normalized input coordinates to native coordinates.

Parameters:

xx – One percent coordinate in [0, 1] per input direction.

Returns:

Native input coordinates.

class vec3dThreeD : public dtOO::vec3dFunction

Base class for three-parameter mappings into three-dimensional space.

Subclassed by dtOO::vec3dBoxThreeD, dtOO::vec3dMuParserThreeD, dtOO::vec3dTransVolThreeD, dtOO::vec3dTriLinearThreeD

Public Functions

virtual vec3dThreeD *clone(void) const = 0

Create a deep copy of this function.

virtual vec3dThreeD *cloneTransformed(dtTransformer const *const dtT) const = 0

Create a copy transformed by the supplied transformer.

virtual vec3dThreeD *create(void) const = 0

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const = 0

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual dtInt xDim(void) const

Return the input-space dimension.

virtual dtReal xMin(dtInt const &dir) const

Return the lower bound of an input direction.

virtual dtReal xMax(dtInt const &dir) const

Return the upper bound of an input direction.

virtual std::vector<dtVector3> DYdtVector3(aFX const &xx) const

Numerically compute the three partial derivative vectors.

dtPoint3 YdtPoint3Percent(aFX const &xx) const

Evaluate the mapping at normalized input coordinates.

virtual aFX xMax(void) const

Return the upper bounds of all input directions.

virtual aFX xMin(void) const

Return the lower bounds of all input directions.

virtual aFX percent_x(aFX const &xx) const

Convert native input coordinates to normalized coordinates.

Parameters:

xx – Native input coordinates.

Returns:

One percent coordinate in [0, 1] per input direction.

virtual aFX x_percent(aFX const &xx) const

Convert normalized input coordinates to native coordinates.

Parameters:

xx – One percent coordinate in [0, 1] per input direction.

Returns:

Native input coordinates.

Concrete

These concrete and adapting classes use analyticFunction or one of the function superclasses to implement scalar and vector mappings.

class sca3PPointsBSplineOneD : public dtOO::scaOneDPolyInterface

Scalar cubic B-spline defined by three control points.

Subclassed by dtOO::analyticFunctionCompound< sca3PPointsBSplineOneD >

Public Functions

sca3PPointsBSplineOneD(dtReal const &xB, dtReal const &yB, dtReal const &xA, dtReal const &yA)

Construct a unit-interval spline through fixed endpoints and two user-supplied intermediate points.

Parameters:
  • xB – First intermediate point abscissa.

  • yB – First intermediate point ordinate.

  • xA – Second intermediate point abscissa.

  • yA – Second intermediate point ordinate.

virtual sca3PPointsBSplineOneD *clone(void) const

Create a deep copy of this function.

virtual sca3PPointsBSplineOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual sca3PPointsBSplineOneD *create(void) const

Create a default instance of the concrete function type.

virtual dtInt nDOF(void) const

Return the number of B-spline degrees of freedom.

virtual void setDOF(std::vector<dtReal> const value)

Update the B-spline degrees of freedom.

class scaCurve2dOneD : public dtOO::scaOneD

Scalar function obtained from the ordinate of a two-dimensional curve.

Public Functions

virtual scaCurve2dOneD *clone(void) const

Create a deep copy of this function.

virtual scaCurve2dOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaCurve2dOneD *create(void) const

Create a default instance of the concrete function type.

dtCurve2d const *constPtrDtCurve2d(void) const

Return the underlying curve as a const pointer.

dtCurve2d *ptrDtCurve2d(void)

Return the underlying curve for modification.

void translate(dtVector2 const vector)

Translate the underlying curve by a vector.

std::vector<dtPoint2> getControlPoints(void) const

Return the control points of the underlying curve.

class scaLinearOneD : public dtOO::scaOneD

Scalar affine interpolation between two input/output point pairs.

Public Functions

virtual scaLinearOneD *clone(void) const

Create a deep copy of this function.

virtual scaLinearOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaLinearOneD *create(void) const

Create a default instance of the concrete function type.

virtual dtReal invYFloat(dtReal const &yy) const

Inverse function.

Parameters:

yy – Function value.

class scaMuParserOneD : public dtOO::scaOneD

Scalar muParser function with one function argument.

Binding to muParser library. The function is created via a string expression.

Public Functions

scaMuParserOneD(std::string const expression, std::string const argument)

Create a simple function, e.g by

fun = scaMuParserOneD(“5.*xx*xx+(2*xx)”, “xx”)

Parameters:
  • expression – Function expression.

  • argument – Argument.

Throws:

dtOO::eGeneral – Catch `muParser` and throw exception.

virtual scaMuParserOneD *clone(void) const

Create a deep copy of this function.

virtual scaMuParserOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaMuParserOneD *create(void) const

Create a default instance of the concrete function type.

void setArgumentRange(dtReal xMin, dtReal xMax)

Set the native input interval accepted by the parsed expression.

class scaMuParserThreeD : public dtOO::scaThreeD

Scalar three-variable expression evaluated by muParser.

Public Functions

scaMuParserThreeD(std::string const expression, std::string const argOne, std::string const argTwo, std::string const argThree)
Parameters:
  • expression – muParser expression that evaluates to a scalar.

  • argOne – Name of the first expression variable.

  • argTwo – Name of the second expression variable.

  • argThree – Name of the third expression variable.

virtual scaMuParserThreeD *clone(void) const

Create a deep copy of this function.

virtual scaMuParserThreeD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaMuParserThreeD *create(void) const

Create a default instance of the concrete function type.

class scaMuParserTwoD : public dtOO::scaTwoD

Scalar two-variable expression evaluated by muParser.

Public Functions

scaMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
Parameters:
  • expression – muParser expression that evaluates to a scalar.

  • argOne – Name of the first expression variable.

  • argTwo – Name of the second expression variable.

virtual scaMuParserTwoD *clone(void) const

Create a deep copy of this function.

virtual scaMuParserTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaMuParserTwoD *create(void) const

Create a default instance of the concrete function type.

template<typename funT>
class scaMultiOneD : public funT

Joins scalar one-dimensional functions over their respective input ranges.

Public Functions

virtual void add(funT const &aFun)

Clone and register a function for its native input interval.

class scaTanhGradingOneD : public dtOO::scaOneDPolyInterface

Scalar hyperbolic-tangent grading function with adjustable coefficients.

Subclassed by dtOO::analyticFunctionCompound< scaTanhGradingOneD >

Public Functions

scaTanhGradingOneD(std::vector<dtReal> cc, dtReal const &gg, dtReal const &ggMin, dtReal const &ggMax)
Parameters:
  • cc – Coefficients of the hyperbolic-tangent expression.

  • gg – Current grading factor.

  • ggMin – Minimum permitted grading factor.

  • ggMax – Maximum permitted grading factor.

virtual scaTanhGradingOneD *clone(void) const

Create a deep copy of this function.

virtual scaTanhGradingOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaTanhGradingOneD *create(void) const

Create a default instance of the concrete function type.

virtual dtInt nDOF(void) const

Return the number of grading degrees of freedom.

virtual void setDOF(std::vector<dtReal> const value)

Update the grading degrees of freedom.

class scaTanhUnitGradingOneD : public dtOO::scaOneDPolyInterface

Unit-interval scalar hyperbolic-tangent grading with adjustable coefficients.

Subclassed by dtOO::analyticFunctionCompound< scaTanhUnitGradingOneD >

Public Functions

scaTanhUnitGradingOneD(std::vector<dtReal> cc, dtReal const &gg, dtReal const &ggMin, dtReal const &ggMax)
Parameters:
  • cc – Coefficients of the unit-interval grading expression.

  • gg – Current grading factor.

  • ggMin – Minimum permitted grading factor.

  • ggMax – Maximum permitted grading factor.

virtual scaTanhUnitGradingOneD *clone(void) const

Create a deep copy of this function.

virtual scaTanhUnitGradingOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual scaTanhUnitGradingOneD *create(void) const

Create a default instance of the concrete function type.

virtual dtInt nDOF(void) const

Return the number of grading degrees of freedom.

virtual void setDOF(std::vector<dtReal> const value)

Update the grading degrees of freedom.

class transIntCube

Transfinite interpolation of a cube bounded by six surface mappings.

Public Functions

transIntCube(map2dTo3d const *const aS0, map2dTo3d const *const aS1, map2dTo3d const *const aS2, map2dTo3d const *const aS3, map2dTo3d const *const aS4, map2dTo3d const *const aS5)

Construct the cube from its normalized-coordinate boundary surfaces.

Parameters:
  • aS0 – Surface at z = 1.

  • aS1 – Surface at x = 0.

  • aS2 – Surface at z = 0.

  • aS3 – Surface at x = 1.

  • aS4 – Surface at y = 0.

  • aS5 – Surface at y = 1.

dtPoint3 getValue(dtReal const xx, dtReal const yy, dtReal const zz) const

Evaluate the interpolated volume at normalized cube coordinates.

vectorHandling<map2dTo3d const*> const &getConstRefToMap2dTo3d(void) const

Return the six boundary-surface mappings in their stored order.

class vec2dBiLinearTwoD : public dtOO::vec2dTwoD

Bilinear mapping of a quadrilateral into two-dimensional space.

Public Functions

vec2dBiLinearTwoD(dtPoint2 const &p0, dtPoint2 const &p1, dtPoint2 const &p2, dtPoint2 const &p3)

Construct from the four corners of the parameter-space quadrilateral.

(v) A |

p3 p2 +—–—+

+—–—+ –> (u) p0 p1

according to: http://en.wikipedia.org/wiki/Bilinear_interpolation

vec2dBiLinearTwoD(dtPoint2 const &p0, dtPoint2 const &p2)

Construct an axis-aligned quadrilateral from opposite corners.

virtual vec2dBiLinearTwoD *clone(void) const

Create a deep copy of this function.

virtual vec2dBiLinearTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec2dBiLinearTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual aFX invY(aFY const &yy) const

Invert a point in the mapped quadrilateral to its parameters.

bool insideY(aFY const &yy) const

Return whether a point lies inside the mapped quadrilateral.

class vec2dCurve2dOneD : public dtOO::vec2dOneD

Two-dimensional curve backed by a dtCurve2d geometry object.

Public Functions

virtual vec2dCurve2dOneD *clone(void) const

Create a deep copy of this function.

virtual vec2dCurve2dOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec2dCurve2dOneD *create(void) const

Create a default instance of the concrete function type.

dtCurve2d const *ptrDtCurve2d(void) const

Return the underlying curve geometry.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

class vec2dMuParserTwoD : public dtOO::vec2dTwoD

Two-dimensional vector expression of two variables evaluated by muParser.

Public Functions

vec2dMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
Parameters:
  • expression – muParser expression that evaluates to two components.

  • argOne – Name of the first expression variable.

  • argTwo – Name of the second expression variable.

virtual vec2dMuParserTwoD *clone(void) const

Create a deep copy of this function.

virtual vec2dMuParserTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec2dMuParserTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

class vec2dMultiBiLinearTwoD : public dtOO::vec2dTwoD

Piecewise bilinear mapping assembled from a two-dimensional point grid.

Public Functions

vec2dMultiBiLinearTwoD(twoDArrayHandling<dtPoint2> const &pp)

Construct piecewise bilinear patches from a rectangular point grid.

virtual vec2dMultiBiLinearTwoD *clone(void) const

Create a deep copy of this function.

virtual vec2dMultiBiLinearTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec2dMultiBiLinearTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual aFX invY(aFY const &yy) const

Invert a mapped point through the containing bilinear patch.

class vec2dSurface2dTwoD : public dtOO::vec2dTwoD

Two-parameter mapping backed by a planar surface geometry object.

Public Functions

virtual vec2dSurface2dTwoD *clone(void) const

Create a deep copy of this function.

virtual vec2dSurface2dTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec2dSurface2dTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

dtSurface2d const *ptrDtSurface2d(void) const

Return the underlying surface geometry.

class vec3dBiLinearTwoD : public dtOO::vec3dTwoD

Bilinear mapping of a quadrilateral into three-dimensional space.

Public Functions

vec3dBiLinearTwoD(dtPoint3 const &p0, dtPoint3 const &p1, dtPoint3 const &p2, dtPoint3 const &p3)

Construct from the four corners of the parameter-space quadrilateral.

(v) A |

p3 p2 +—–—+

+—–—+ –> (u) p0 p1

according to: http://en.wikipedia.org/wiki/Bilinear_interpolation

virtual vec3dBiLinearTwoD *clone(void) const

Create a deep copy of this function.

virtual vec3dBiLinearTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dBiLinearTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

class vec3dBoxThreeD : public dtOO::vec3dThreeD

Trilinear mapping of an axis-aligned box defined by opposite corners.

Subclassed by dtOO::analyticFunctionCompound< vec3dBoxThreeD >

Public Functions

virtual vec3dBoxThreeD *clone(void) const

Create a deep copy of this function.

virtual vec3dBoxThreeD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dBoxThreeD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual bool closed(dtInt const &dir) const

Todo:

Fix closed method. Currently return value is always false!

class vec3dCurve2dInSurfaceOneD : public dtOO::vec3dOneD

Three-dimensional curve obtained by embedding a 2D curve in a surface.

Public Functions

virtual vec3dCurve2dInSurfaceOneD *clone(void) const

Create a deep copy of this function.

virtual vec3dCurve2dInSurfaceOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dCurve2dInSurfaceOneD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual bool closed(dtInt const &dir) const

Todo:

: What if surface is closed and curve goes in periodic direction?

class vec3dCurveOneD : public dtOO::vec3dOneD

Three-dimensional curve backed by a dtCurve geometry object.

Subclassed by dtOO::analyticFunctionCompound< vec3dCurveOneD >

Public Functions

virtual vec3dCurveOneD *clone(void) const

Create a deep copy of this function.

virtual vec3dCurveOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dCurveOneD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

dtCurve *ptrDtCurve(void) const

Return the underlying curve geometry for modification.

dtCurve const *const ptrConstDtCurve(void) const

Return the underlying curve geometry as a const pointer.

class vec3dMuParserOneD : public dtOO::vec3dOneD

Three-dimensional vector expression of one variable evaluated by muParser.

Public Functions

vec3dMuParserOneD(std::string const expression, std::string const argOne)
Parameters:
  • expression – muParser expression that evaluates to three components.

  • argOne – Name of the expression variable.

virtual vec3dMuParserOneD *clone(void) const

Create a deep copy of this function.

virtual vec3dMuParserOneD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dMuParserOneD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

class vec3dMuParserThreeD : public dtOO::vec3dThreeD

Three-dimensional vector expression of three variables evaluated by muParser.

Public Functions

vec3dMuParserThreeD(std::string const expression, std::string const argOne, std::string const argTwo, std::string const argThree)
Parameters:
  • expression – muParser expression that evaluates to three components.

  • argOne – Name of the first expression variable.

  • argTwo – Name of the second expression variable.

  • argThree – Name of the third expression variable.

virtual vec3dMuParserThreeD *clone(void) const

Create a deep copy of this function.

virtual vec3dMuParserThreeD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dMuParserThreeD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

class vec3dMuParserTwoD : public dtOO::vec3dTwoD

Three-dimensional vector expression of two variables evaluated by muParser.

Public Functions

vec3dMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
Parameters:
  • expression – muParser expression that evaluates to three components.

  • argOne – Name of the first expression variable.

  • argTwo – Name of the second expression variable.

virtual vec3dMuParserTwoD *clone(void) const

Create a deep copy of this function.

virtual vec3dMuParserTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dMuParserTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

template<typename funT>
class vec3dMultiThreeD : public funT

Joins three-dimensional volume mappings over their respective input boxes.

Public Functions

virtual void add(funT *aFun)

Register an owned function for its native three-dimensional input box.

Parameters:

aFun – Function whose ownership is transferred to this collection.

Public Static Functions

static bool rTreeCallback(funT *aFun, void *ctx)

Append an R-tree search result to the callback context vector.

class vec3dSurfaceTwoD : public dtOO::vec3dTwoD

Two-parameter three-dimensional mapping backed by a surface geometry object.

Subclassed by dtOO::analyticFunctionCompound< vec3dSurfaceTwoD >

Public Functions

virtual vec3dSurfaceTwoD *clone(void) const

Create a deep copy of this function.

virtual vec3dSurfaceTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dSurfaceTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

dtSurface *ptrDtSurface(void) const

Return the underlying surface geometry for modification.

dtSurface const *constPtrDtSurface(void) const

Return the underlying surface geometry as a const pointer.

virtual aFX invY(aFY const &yy) const

Invert a point on the underlying surface to its parameters.

class vec3dThickedTwoD : public dtOO::vec3dTwoD

Add a scalar function \(s(\underline{x})\) value to a vector function \(\underline{f}(u,v)\) according to

\[ \underline{t}(u,v) = \underline{f}(u,v) + s(\underline{x}) \left( \underline{n}_f(u,v) - \left( \underline{n}_f(u,v) \cdot \underline{c} \right) \cdot \underline{c} \right) \text{.} \]
The reference vector \(\underline{c}\) is supplied when constructing the mapping.

Public Functions

vec3dThickedTwoD(vec3dTwoD const *const ff, vec3dTwoD const *const tt, dtVector3 const nf)
Parameters:
  • ff – Base surface mapping.

  • tt – Thickness mapping.

  • nf – User-defined reference vector used to project the normal.

virtual vec3dThickedTwoD *clone(void) const

Create a deep copy of this function.

virtual vec3dThickedTwoD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dThickedTwoD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual bool closed(dtInt const &dir) const

Todo:

Is this correct? Is it never closed?

class vec3dTransVolThreeD : public dtOO::vec3dThreeD

Transfinite volume mapping constructed from six boundary-surface mappings.

Subclassed by dtOO::analyticFunctionCompound< vec3dTransVolThreeD >

Public Functions

vec3dTransVolThreeD(vec3dTwoD const *const v3d2d0, vec3dTwoD const *const v3d2d1, vec3dTwoD const *const v3d2d2, vec3dTwoD const *const v3d2d3, vec3dTwoD const *const v3d2d4, vec3dTwoD const *const v3d2d5)

Construct the volume from its normalized-coordinate boundary surfaces.

Parameters:
  • v3d2d0 – Surface at z = 1.

  • v3d2d1 – Surface at x = 0.

  • v3d2d2 – Surface at z = 0.

  • v3d2d3 – Surface at x = 1.

  • v3d2d4 – Surface at y = 0.

  • v3d2d5 – Surface at y = 1.

virtual vec3dTransVolThreeD *clone(void) const

Create a deep copy of this function.

virtual vec3dTransVolThreeD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dTransVolThreeD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual bool closed(dtInt const &dir) const

Todo:

Fix closed method. Currently return value is always false!

ptrVectorHandling<vec3dTwoD> const &refVec3dTwoD(void) const

Return the owned boundary-surface mappings.

vec3dTwoD const *const constPtrVec3dTwoD(dtInt const ii) const

Return boundary surface ii as a const pointer.

class vec3dTriLinearThreeD : public dtOO::vec3dThreeD

Trilinear mapping of a hexahedron defined by its eight corner points.

Public Functions

vec3dTriLinearThreeD(dtPoint3 const &p000, dtPoint3 const &p100, dtPoint3 const &p010, dtPoint3 const &p110, dtPoint3 const &p001, dtPoint3 const &p101, dtPoint3 const &p011, dtPoint3 const &p111)

according to: https://en.wikipedia.org/wiki/Trilinear_interpolation

virtual vec3dTriLinearThreeD *clone(void) const

Create a deep copy of this function.

virtual vec3dTriLinearThreeD *cloneTransformed(dtTransformer const *const dtT) const

Create a copy transformed by the supplied transformer.

virtual vec3dTriLinearThreeD *create(void) const

Create a default instance of the concrete function type.

virtual aFY Y(aFX const &xx) const

Evaluate the function.

Parameters:

xx – Input vector in native coordinates.

Returns:

Function value.

virtual std::pair<aFY, aFY> yBoundingBox(void) const

Return output bounds derived from the eight corner points.