BaseNURBSCurve Class Reference

#include <NURBSMath.h>

Inheritance diagram for BaseNURBSCurve:

Public Member Functions

Result< void > Init (Int pcnt, Int degree)
 
void Reset ()
 
Result< void > ChangeDegree (Int newDegree, NURBSCURVE_KNOTMODE knotMode=NURBSCURVE_KNOTMODE::CLAMPED_UNIFORM)
 
Result< VectorEvaluateAt (Float s)
 
Result< VectorEvaluateAt (Float u, Int span)
 
Result< VectorDeriveAt (Float s)
 
Result< VectorDeriveAt (Float u, Int span)
 
Result< IntGetDegree ()
 
Result< IntGetMaxDegree ()
 
Result< IntGetPointCount ()
 
Result< IntGetWeightCount ()
 
Result< IntGetKnotCount ()
 
Result< KnotInfoGetKnotInfo (Int i)
 
Result< VectorGetPoint (Int i)
 
Result< FloatGetWeight (Int i)
 
Result< FloatGetKnot (Int i)
 
Result< void > SetPoint (Int i, const Vector &point)
 
Result< void > SetPoints (const BaseArray< Vector > &points)
 
Result< void > SetWeight (Int i, Float weight)
 
Result< void > SetWeights (const BaseArray< Float > &weights)
 
Result< void > SetKnot (Int i, Float knot)
 
Result< void > SetKnots (NURBSCURVE_KNOTMODE mode)
 
Result< void > SetKnots (const BaseArray< Float > &knots)
 
Result< void > InsertKnot (Float s, Int nTimes)
 
Result< void > InsertKnot (Float u, Int span, Int nTimes)
 
Float GetUmin ()
 
Float GetUmax ()
 
Result< IntFindSpan (Float u)
 
Float MapStoU (Float s)
 
Float MapUtoS (Float u)
 

Protected Member Functions

Result< void > _CheckForKnotConsistency ()
 
Result< void > _InitKnots (NURBSCURVE_KNOTMODE mode)
 
Result< void > _ComputeBasisFunctions (Float u, Int span, Int maxDegree)
 
Result< Vector4d_ComputeHomogeneousC (Float u, Int span, Int degree)
 

Protected Attributes

Int _curveDegree
 
BaseArray< Vector4d_points
 
BaseArray< Float_knots
 
Bool _dirty
 
Bool _memInit
 

Private Attributes

MatrixNxM< Float_basis
 
BaseArray< Float_left
 
BaseArray< Float_right
 
MatrixNxM< Float_ndu
 
MatrixNxM< Float_a
 

Friends

class NURBSCurve
 

Member Function Documentation

◆ Init()

Result<void> Init ( Int  pcnt,
Int  degree 
)

◆ Reset()

void Reset ( )

◆ ChangeDegree()

Result<void> ChangeDegree ( Int  newDegree,
NURBSCURVE_KNOTMODE  knotMode = NURBSCURVE_KNOTMODE::CLAMPED_UNIFORM 
)

◆ EvaluateAt() [1/2]

Result<Vector> EvaluateAt ( Float  s)

◆ EvaluateAt() [2/2]

Result<Vector> EvaluateAt ( Float  u,
Int  span 
)

◆ DeriveAt() [1/2]

Result<Vector> DeriveAt ( Float  s)

◆ DeriveAt() [2/2]

Result<Vector> DeriveAt ( Float  u,
Int  span 
)

◆ GetDegree()

Result<Int> GetDegree ( )

◆ GetMaxDegree()

Result<Int> GetMaxDegree ( )

◆ GetPointCount()

Result<Int> GetPointCount ( )

◆ GetWeightCount()

Result<Int> GetWeightCount ( )

◆ GetKnotCount()

Result<Int> GetKnotCount ( )

◆ GetKnotInfo()

Result<KnotInfo> GetKnotInfo ( Int  i)

◆ GetPoint()

Result<Vector> GetPoint ( Int  i)

◆ GetWeight()

Result<Float> GetWeight ( Int  i)

◆ GetKnot()

Result<Float> GetKnot ( Int  i)

◆ SetPoint()

Result<void> SetPoint ( Int  i,
const Vector point 
)

◆ SetPoints()

Result<void> SetPoints ( const BaseArray< Vector > &  points)

◆ SetWeight()

Result<void> SetWeight ( Int  i,
Float  weight 
)

◆ SetWeights()

Result<void> SetWeights ( const BaseArray< Float > &  weights)

◆ SetKnot()

Result<void> SetKnot ( Int  i,
Float  knot 
)

◆ SetKnots() [1/2]

Result<void> SetKnots ( NURBSCURVE_KNOTMODE  mode)

◆ SetKnots() [2/2]

Result<void> SetKnots ( const BaseArray< Float > &  knots)

◆ InsertKnot() [1/2]

Result<void> InsertKnot ( Float  s,
Int  nTimes 
)

◆ InsertKnot() [2/2]

Result<void> InsertKnot ( Float  u,
Int  span,
Int  nTimes 
)

◆ GetUmin()

Float GetUmin ( )

◆ GetUmax()

Float GetUmax ( )

◆ FindSpan()

Result<Int> FindSpan ( Float  u)

◆ MapStoU()

Float MapStoU ( Float  s)

◆ MapUtoS()

Float MapUtoS ( Float  u)

◆ _CheckForKnotConsistency()

Result<void> _CheckForKnotConsistency ( )
protected

◆ _InitKnots()

Result<void> _InitKnots ( NURBSCURVE_KNOTMODE  mode)
protected

◆ _ComputeBasisFunctions()

Result<void> _ComputeBasisFunctions ( Float  u,
Int  span,
Int  maxDegree 
)
protected

◆ _ComputeHomogeneousC()

Result<Vector4d> _ComputeHomogeneousC ( Float  u,
Int  span,
Int  degree 
)
protected

Friends And Related Function Documentation

◆ NURBSCurve

friend class NURBSCurve
friend

Member Data Documentation

◆ _curveDegree

Int _curveDegree
protected

◆ _points

BaseArray<Vector4d> _points
protected

◆ _knots

BaseArray<Float> _knots
protected

◆ _dirty

Bool _dirty
protected

◆ _memInit

Bool _memInit
protected

◆ _basis

MatrixNxM<Float> _basis
private

◆ _left

BaseArray<Float> _left
private

◆ _right

BaseArray<Float> _right
private

◆ _ndu

MatrixNxM<Float> _ndu
private

◆ _a

MatrixNxM<Float> _a
private