BeamAdapter
Loading...
Searching...
No Matches
ProjectionSearch< DataTypes > Class Template Reference

#include <AdaptiveBeamSlidingConstraint.h>

Public Types

typedef DataTypes::VecCoord VecCoord
typedef DataTypes::Coord Coord
typedef Coord::value_type Real
typedef Vec< 3, Real > Vec3

Public Member Functions

 ProjectionSearch (WireBeamInterpolation< DataTypes > *inter, const Vec3 &x_input, const VecCoord &vecX, Real &xcurv_output, const Real &tol)
 Default Constructor.
bool doSearch (Real &result)
void initSearch (Real curvAbs)
void newtonMethod ()
bool changeCurrentBeam (int index)
Real computeDistAtCurvAbs (Real curvAbs)
bool testForProjection (Real curvAbs)

Public Attributes

WireBeamInterpolation< DataTypes > * m_interpolation
 The interpolation using this class.
const VecCoord & m_x
 The positions of the beams we are working on*‍/.
Vec3 m_target
 The point to be projected on the curve*‍/.
bool m_found
 True when the estimation is acceptable for the given tolerance*‍/.
Real m_tolerance
 Tolerance for the end of the search (projection of the estimation on the tangent is < than tolerance)*‍/.
unsigned int m_beamIndex
 The current beam for the search.
unsigned int m_totalIterations
unsigned int m_dichotomicIterations
int m_searchDirection
 When we change beam, which direction is it ?
Real m_e
Real m_le
Real m_de
 Current estimation of the projection, its value in the current beam ([0,1]), and its distance to the target.
Real m_beamStart
Real m_beamEnd
 Abscissa of the current beam extremities.
Real m_segStart
Real m_segEnd
 Abscissa of the current search segment extremities.
Real range
Real rangeSampling
 The length of the current search segment, and the distance between 2 sampling points.
Vec3 P0
Vec3 P1
Vec3 P2
Vec3 P3
 Current beam control points.
Real m_distTab [s_sampling+1]
 Array of distances.

Static Public Attributes

static const unsigned int s_sampling { 10 }
 How many points do we consider each step ? (at least > 3 or it will never converge).

Detailed Description

template<class DataTypes>
class beamadapter::ProjectionSearch< DataTypes >

When the Newton method doesn't converge when searching for the closest projection on the curve, we will start a dichotomic search, for now a unoptimized brute force approach.

Member Data Documentation

◆ m_dichotomicIterations

template<class DataTypes>
unsigned int m_dichotomicIterations

of iterations for the current beam

◆ m_totalIterations

template<class DataTypes>
unsigned int m_totalIterations

of iterations (including beam changes)