Atoms Crowd  7.0.0
AtomsUtils::SampledCurve Class Reference

Nurbs curve. More...

#include <SampledCurve.h>

Inheritance diagram for AtomsUtils::SampledCurve:
AtomsUtils::Curve

Public Member Functions

 SampledCurve ()
 Constructor.
 
 SampledCurve (const std::vector< AtomsMath::Vector3f > cvs, unsigned int degree, unsigned short numSamples=50)
 Constructor. More...
 
virtual ~SampledCurve ()
 Destructor.
 
virtual std::pair< float, AtomsMath::Vector3f > closestPoint (const AtomsMath::Vector3f &point, unsigned int maxStep=6, unsigned int maxIterations=10, float tollarence=0.0001f) override
 Get closest point. More...
 
virtual std::pair< float, AtomsMath::Vector3f > closestTangent (const AtomsMath::Vector3f &point, unsigned int maxStep=6, unsigned int maxIterations=10, float tollarence=0.0001f) override
 Get closest tangent. More...
 
void resample (unsigned short samples)
 
unsigned short numSamples () const
 
const std::vector< AtomsMath::Vector3f > & samples () const
 
const std::vector< AtomsMath::Vector3f > & tangents () const
 
- Public Member Functions inherited from AtomsUtils::Curve
 Curve ()
 Constructor.
 
 Curve (const std::vector< AtomsMath::Vector3f > cvs, unsigned int degree)
 Constructor. More...
 
virtual ~Curve ()
 Destructor.
 
int findSpan (float u) const
 Find span. More...
 
int findKnot (float u) const
 Find span. More...
 
int findMult (int r) const
 Find multiplicity. More...
 
void computeUniformKnots ()
 Compute uniform knots. More...
 
std::vector< float > basis (int knotSpan, float u) const
 Basis function for B-Spline. More...
 
std::vector< std::vector< float > > dersBasis (int knotSpan, float u, unsigned int degree) const
 Basis function for B-Spline. More...
 
AtomsMath::Vector3f pointOnCurve (float param) const
 Get a point on the curve. More...
 
AtomsMath::Vector3f tangentOnCurve (float param) const
 Get a tangent on the curve. More...
 
std::vector< AtomsMath::Vector3f > curveDerivs (float param, unsigned int nderiv) const
 Return the curve derivative. More...
 
std::vector< AtomsMath::Vector3f > parallelFrameNormals (unsigned int samples, AtomsMath::Vector3f upVec) const
 Get curve normals using parallel frame. More...
 
AtomsMath::Matrixf parallelFrameAtPoint (unsigned int samples, AtomsMath::Vector3f upVec, float param) const
 Get curve normal on a point using parallel frame. More...
 
float maxU () const
 Max U value.
 
std::vector< AtomsMath::Vector3f > & cvs ()
 Get curve cvs.
 
const std::vector< AtomsMath::Vector3f > & cvs () const
 Ge curve cvs.
 
std::vector< float > & knots ()
 Get curve knots.
 
const std::vector< float > & knots () const
 Get curve knots.
 
unsigned int degree () const
 Get curve degree.
 
void setDegree (unsigned int degree)
 Set curve degree.
 
const Curveoperator= (const Curve &curve)
 Assign operator.
 

Detailed Description

Nurbs curve.

Constructor & Destructor Documentation

◆ SampledCurve()

AtomsUtils::SampledCurve::SampledCurve ( const std::vector< AtomsMath::Vector3f >  cvs,
unsigned int  degree,
unsigned short  numSamples = 50 
)

Constructor.

Parameters
cvsControl vertices
degreeCurve degree

Member Function Documentation

◆ closestPoint()

virtual std::pair<float, AtomsMath::Vector3f> AtomsUtils::SampledCurve::closestPoint ( const AtomsMath::Vector3f &  point,
unsigned int  maxStep = 6,
unsigned int  maxIterations = 10,
float  tollarence = 0.0001f 
)
overridevirtual

Get closest point.

Parameters
pointPoint
maxStepMax number of step
maxIterationMax number of iterations

Reimplemented from AtomsUtils::Curve.

◆ closestTangent()

virtual std::pair<float, AtomsMath::Vector3f> AtomsUtils::SampledCurve::closestTangent ( const AtomsMath::Vector3f &  point,
unsigned int  maxStep = 6,
unsigned int  maxIterations = 10,
float  tollarence = 0.0001f 
)
overridevirtual

Get closest tangent.

Parameters
pointPoint
maxStepMax number of step
maxIterationMax number of iterations

Reimplemented from AtomsUtils::Curve.


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