10 #include <AtomsUtils/Curve.h>
11 #include <AtomsUtils/KdTreePoint.h>
28 SampledCurve(
const std::vector<AtomsMath::Vector3f> cvs,
unsigned int degree,
unsigned short numSamples = 50);
33 virtual std::pair<float, AtomsMath::Vector3f>
closestPoint(
const AtomsMath::Vector3f& point,
unsigned int maxStep = 6,
unsigned int maxIterations = 10,
float tollarence = 0.0001f)
override;
35 virtual std::pair<float, AtomsMath::Vector3f>
closestTangent(
const AtomsMath::Vector3f& point,
unsigned int maxStep = 6,
unsigned int maxIterations = 10,
float tollarence = 0.0001f)
override;
37 void resample(
unsigned short samples);
39 inline unsigned short numSamples()
const {
return m_numSamples; }
41 inline const std::vector<AtomsMath::Vector3f>& samples()
const {
return m_points; }
43 inline const std::vector<AtomsMath::Vector3f>& tangents()
const {
return m_tangents; }
49 std::vector<AtomsMath::Vector3f> m_points;
51 std::vector<AtomsMath::Vector3f> m_tangents;
53 unsigned short m_numSamples;
Nurbs curve.
Definition: Curve.h:18
Nurbs curve.
Definition: SampledCurve.h:17
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.
virtual ~SampledCurve()
Destructor.
SampledCurve(const std::vector< AtomsMath::Vector3f > cvs, unsigned int degree, unsigned short numSamples=50)
Constructor.
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.
SampledCurve()
Constructor.
AtomsCore namespace.
Definition: Base64.h:13