Public Types | Public Member Functions | List of all members
tuw::ParamFuncsDist Class Referenceabstract

Extends manipulation of parametric functions collection with closed-form arc length (distance) computation. More...

#include <param_func_dist.h>

Inheritance diagram for tuw::ParamFuncsDist:
Inheritance graph
[legend]

Public Types

enum  TraveledDistCfMode { TraveledDistCfMode::NONE, TraveledDistCfMode::V, TraveledDistCfMode::AV }
 Required type of traveled distance computation relative to the parametric function. More...
 
- Public Types inherited from tuw::ParamFuncs
enum  CtrlPtDim { CtrlPtDim::VAL, CtrlPtDim::ARC }
 Control point variable dimension. More...
 
enum  EvalArcGuarantee {
  EvalArcGuarantee::NONE, EvalArcGuarantee::AFTER_LAST, EvalArcGuarantee::BEFORE_LAST, EvalArcGuarantee::AT_BEGIN,
  EvalArcGuarantee::AT_END
}
 Flags if any guarantees about evaluation arc relative to last evaluation arc are present. More...
 
enum  FuncEvalMode {
  FuncEvalMode::DIFF1, FuncEvalMode::DIFF2, FuncEvalMode::INT1, FuncEvalMode::INT2,
  FuncEvalMode::FUNC, FuncEvalMode::ENUM_SIZE
}
 Required type of computation relative to the parametric function. More...
 
using FuncEvalModesFlags = std::array< bool, nrModesMax_ >
 

Public Member Functions

virtual double computeS () const =0
 
virtual void computeS2TLattice (const std::vector< double > &_sLattice, std::vector< double > &_tLattice)=0
 Computes arc parametrization lattice given a distance-parametrized lattice. More...
 
virtual void computeS2TLattice (const double &_arc0, const double &_ds, std::vector< double > &_tLattice)=0
 Computes arc parametrization lattice given an inital arc and distance parametrized sampling interval. More...
 
virtual double computeT (const double &_s, const ParamFuncs::EvalArcGuarantee &_evalArcGuarantee=ParamFuncs::EvalArcGuarantee::NONE)=0
 
ParamFuncsDistoperator= (const ParamFuncsDist &_other)=default
 
ParamFuncsDistoperator= (ParamFuncsDist &&)=delete
 
 ParamFuncsDist ()=default
 
 ParamFuncsDist (const ParamFuncsDist &_other)=default
 
 ParamFuncsDist (ParamFuncsDist &&)=delete
 
virtual void setDistCfMode (TraveledDistCfMode _distCfMode, const std::vector< std::size_t > &_distRelFuncIdx)=0
 Initializer of the Closed form distance computation mode. More...
 
virtual void setEvalDist (const double &_funcsDistEval, const ParamFuncs::EvalArcGuarantee &_evalArcGuarantee=ParamFuncs::EvalArcGuarantee::NONE)=0
 Moves to evaluation arc at which the traveled distance _funcsDistEval is achieved. More...
 
virtual ~ParamFuncsDist ()=default
 
- Public Member Functions inherited from tuw::ParamFuncs
virtual double computeFuncDiff1 (const std::size_t &_funcIdx) const =0
 Computes 1st derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
virtual double computeFuncDiff2 (const std::size_t &_funcIdx) const =0
 Computes 2nd derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
virtual double computeFuncInt1 (const std::size_t &_funcIdx) const =0
 Computes integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
virtual double computeFuncInt2 (const std::size_t &_funcIdx) const =0
 Computes double integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
virtual double computeFuncVal (const std::size_t &_funcIdx) const =0
 Computes value of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
FuncCtrlPtctrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx)
 Access of a parametric function control point. More...
 
const FuncCtrlPtctrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx) const
 Const access of a parametric function control point. More...
 
double & ctrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL)
 Access of a parametric function control point dimension. More...
 
const double & ctrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL) const
 Const of a parametric function control point dimension. More...
 
std::size_t funcCtrlPtSize (const std::size_t &_i) const
 Number of control points for a parametric function. More...
 
double & funcsArc (const std::size_t &_i, const std::size_t &_j)
 Access to the arc parameter vector at index _i, control point _j. More...
 
const double & funcsArc (const std::size_t &_i, const std::size_t &_j) const
 Const access the arc parameter vector at index _i, control point _j. More...
 
double & funcsArcBegin ()
 Access to the initial value of the arc parametrization. More...
 
const double & funcsArcBegin () const
 Const access to the initial value of the arc parametrization. More...
 
double & funcsArcEnd ()
 Access to the final value of the arc parametrization. More...
 
const double & funcsArcEnd () const
 Const access to the finall value of the arc parametrization. More...
 
const double & funcsArcEval () const
 Const access to the active evaluation point arc parametrization. More...
 
std::size_t funcsArcSize () const
 Number of arc parametrizations. More...
 
std::size_t funcsArcSize (const std::size_t &_i) const
 Number of control points of parametrization _i. More...
 
std::size_t funcsSize () const
 Number of parametric functions. More...
 
void init (const std::vector< tuw::ParamFuncs::ParamFuncsStructure > &_paramFuncsStructure)
 Initializes the control structure. More...
 
ParamFuncsoperator= (const ParamFuncs &)
 
ParamFuncsoperator= (ParamFuncs &&)=delete
 
 ParamFuncs ()=default
 
 ParamFuncs (const ParamFuncs &)
 
 ParamFuncs (ParamFuncs &&)=delete
 
virtual void precompute ()=0
 Precomputes cached data. More...
 
virtual void setEvalArc (const double &_funcsArcEval, const EvalArcGuarantee &_evalArcGuarantee=EvalArcGuarantee::NONE)=0
 Sets parametric function evaluation arc. More...
 
void shiftStartCtrlPt (const double &_dt)
 
virtual ~ParamFuncs ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from tuw::ParamFuncs
static constexpr const std::size_t nrModesMax_ = asInt(FuncEvalMode::ENUM_SIZE) - 1
 Maximum number of computation modes (except the parametric function itself FUNC). Currently 4 other choices supported. More...
 
- Protected Member Functions inherited from tuw::ParamFuncs
virtual void initImpl ()=0
 Called at end of init. To be used by extended classes. More...
 
- Protected Attributes inherited from tuw::ParamFuncs
std::vector< std::size_t > func2Arc_
 Maps the parametrized functions to their afferent arc parametrizations. More...
 
std::vector< std::vector< FuncCtrlPt > > funcCtrlPt_
 Stores the control points for all the parametrized functions. More...
 
std::vector< FuncEvalModesFlagsfuncEvalReq_
 Flags for required function computation modes. More...
 
double funcsArcBegin_
 Arc parametrization at the beginning of the functions domain definitions (common for all functions). More...
 
double funcsArcEnd_
 Arc parametrization at the end of the functions domain definitions (common for all functions). More...
 
double funcsArcEval_
 Arc parametrization at the evaluation point (set by setEvalArc)/. More...
 
std::vector< ParamFuncsStructureparamFuncsStructure_
 Initialization structure "store" variable. More...
 

Detailed Description

Extends manipulation of parametric functions collection with closed-form arc length (distance) computation.

Definition at line 51 of file param_func_dist.h.

Member Enumeration Documentation

Required type of traveled distance computation relative to the parametric function.

Enumerator
NONE 

no closed-form distance computation mode

agent base center linear velocity is parametric function

AV 

agent base center linear acceleration is parametric function

Definition at line 56 of file param_func_dist.h.

Constructor & Destructor Documentation

tuw::ParamFuncsDist::ParamFuncsDist ( )
default
virtual tuw::ParamFuncsDist::~ParamFuncsDist ( )
virtualdefault
tuw::ParamFuncsDist::ParamFuncsDist ( const ParamFuncsDist _other)
default
tuw::ParamFuncsDist::ParamFuncsDist ( ParamFuncsDist &&  )
delete

Member Function Documentation

virtual double tuw::ParamFuncsDist::computeS ( ) const
pure virtual

Solves the equation $ \int_{0}^{evalArc\_}{ |v(\mathbf{p}, t)| } dt = \_s $ for _deltaS (evalArc_: time, _s: traveled distance, v: body linear velocity, $ \mathbf{p} $: parametrized control points).

Implemented in tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, tuw::ParamFuncsSpline0Dist< TNumType, 2, 2 >, and tuw::ParamFuncsSpline0Dist< TNumType, 2, 1 >.

virtual void tuw::ParamFuncsDist::computeS2TLattice ( const std::vector< double > &  _sLattice,
std::vector< double > &  _tLattice 
)
pure virtual

Computes arc parametrization lattice given a distance-parametrized lattice.

Parameters
_sLatticeDistance-parametrized input lattice. It is assumed that the vector is monotonically increasing.
_tLatticeArc-parametrized output lattice.

Implemented in tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, tuw::ParamFuncsSpline0Dist< TNumType, 2, 2 >, and tuw::ParamFuncsSpline0Dist< TNumType, 2, 1 >.

virtual void tuw::ParamFuncsDist::computeS2TLattice ( const double &  _arc0,
const double &  _ds,
std::vector< double > &  _tLattice 
)
pure virtual

Computes arc parametrization lattice given an inital arc and distance parametrized sampling interval.

The function computes the temporal lattice starting with s(_arc0) and ending with the maximum value of the arc parametrization.

Parameters
_sLatticeDistance-parametrized input lattice. It is assumed that the vector values are monotonically increasing.
_tLatticeArc-parametrized output lattice.

Implemented in tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, tuw::ParamFuncsSpline0Dist< TNumType, 2, 2 >, and tuw::ParamFuncsSpline0Dist< TNumType, 2, 1 >.

virtual double tuw::ParamFuncsDist::computeT ( const double &  _s,
const ParamFuncs::EvalArcGuarantee _evalArcGuarantee = ParamFuncs::EvalArcGuarantee::NONE 
)
pure virtual

Solves the equation $ \int_{0}^{\_deltaT}{ |v(\mathbf{p}, t)| } dt = \_s $ for _s (evalArc_: time, _s: traveled distance, v: body linear velocity, $ \mathbf{p} $: parametrized control points).

Implemented in tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, tuw::ParamFuncsSpline0Dist< TNumType, 2, 2 >, and tuw::ParamFuncsSpline0Dist< TNumType, 2, 1 >.

ParamFuncsDist& tuw::ParamFuncsDist::operator= ( const ParamFuncsDist _other)
default
ParamFuncsDist& tuw::ParamFuncsDist::operator= ( ParamFuncsDist &&  )
delete
virtual void tuw::ParamFuncsDist::setDistCfMode ( TraveledDistCfMode  _distCfMode,
const std::vector< std::size_t > &  _distRelFuncIdx 
)
pure virtual

Initializer of the Closed form distance computation mode.

virtual void tuw::ParamFuncsDist::setEvalDist ( const double &  _funcsDistEval,
const ParamFuncs::EvalArcGuarantee _evalArcGuarantee = ParamFuncs::EvalArcGuarantee::NONE 
)
pure virtual

Moves to evaluation arc at which the traveled distance _funcsDistEval is achieved.

Implemented in tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, tuw::ParamFuncsSpline0Dist< TNumType, 2, 2 >, and tuw::ParamFuncsSpline0Dist< TNumType, 2, 1 >.


The documentation for this class was generated from the following file:


tuw_control
Author(s): George Todoran
autogenerated on Mon Jun 10 2019 15:27:23