![]() |
Atoms Crowd
7.0.0
|
Nurbs curve. More...
#include <Curve.h>
Public Member Functions | |
| 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... | |
| virtual std::pair< float, AtomsMath::Vector3f > | closestPoint (const AtomsMath::Vector3f &point, unsigned int maxStep=6, unsigned int maxIterations=10, float tollarence=0.0001f) |
| 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) |
| Get closest tangent. 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 Curve & | operator= (const Curve &curve) |
| Assign operator. | |
Nurbs curve.
| AtomsUtils::Curve::Curve | ( | const std::vector< AtomsMath::Vector3f > | cvs, |
| unsigned int | degree | ||
| ) |
Constructor.
| cvs | Control vertices |
| degree | Curve degree |
| std::vector<float> AtomsUtils::Curve::basis | ( | int | knotSpan, |
| float | u | ||
| ) | const |
Basis function for B-Spline.
| knotSpan | knot span ( from findSpan() ) |
| u | parameter |
|
virtual |
Get closest point.
| point | Point |
| maxStep | Max number of step |
| maxIteration | Max number of iterations |
Reimplemented in AtomsUtils::SampledCurve.
|
virtual |
Get closest tangent.
| point | Point |
| maxStep | Max number of step |
| maxIteration | Max number of iterations |
Reimplemented in AtomsUtils::SampledCurve.
| void AtomsUtils::Curve::computeUniformKnots | ( | ) |
Compute uniform knots.
Compute a uniform knots span for the control points
| std::vector<AtomsMath::Vector3f> AtomsUtils::Curve::curveDerivs | ( | float | param, |
| unsigned int | nderiv | ||
| ) | const |
Return the curve derivative.
| param | Parametric point |
| nderiv | derivative degree |
| std::vector<std::vector<float> > AtomsUtils::Curve::dersBasis | ( | int | knotSpan, |
| float | u, | ||
| unsigned int | degree | ||
| ) | const |
Basis function for B-Spline.
| knotSpan | knot span ( from findSpan() ) |
| int AtomsUtils::Curve::findKnot | ( | float | u | ) | const |
Find span.
Finds the knot k for which u is in the range [u_k,u_{k+1})
| u | parametric value |
| int AtomsUtils::Curve::findMult | ( | int | r | ) | const |
Find multiplicity.
Finds the multiplicity of a knot
| r | the knot to observe |
| int AtomsUtils::Curve::findSpan | ( | float | u | ) | const |
Find span.
Find on which span the given u value lies in
| u | parameter |
| AtomsMath::Matrixf AtomsUtils::Curve::parallelFrameAtPoint | ( | unsigned int | samples, |
| AtomsMath::Vector3f | upVec, | ||
| float | param | ||
| ) | const |
Get curve normal on a point using parallel frame.
| samples | Number of samples |
| upVec | Up vector |
| Parametric | position |
| std::vector<AtomsMath::Vector3f> AtomsUtils::Curve::parallelFrameNormals | ( | unsigned int | samples, |
| AtomsMath::Vector3f | upVec | ||
| ) | const |
Get curve normals using parallel frame.
| samples | Number of samples |
| upVec | Up vector |
| AtomsMath::Vector3f AtomsUtils::Curve::pointOnCurve | ( | float | param | ) | const |
Get a point on the curve.
| param | parametric position of the point |
| AtomsMath::Vector3f AtomsUtils::Curve::tangentOnCurve | ( | float | param | ) | const |
Get a tangent on the curve.
| param | parametric position of the point |