NURBSCurve Class Reference


Detailed Description

Definition at line 30 of file nurbs.h.

#include <nurbs.h>

Inheritance diagram for NURBSCurve:
Inheritance graph
[legend]

List of all members.

Classes

struct   ChordLength

Public Member Functions

  NURBSCurve (int iDegree=2, bool bFalloff=false)
  ~NURBSCurve (void)
bool  operator== (const NURBSCurve &) const throw ()
bool  operator!= (const NURBSCurve &v) const throw ()
void  SetVisible (bool bVisible)
  Sets the node visibility Should be overridden in derived classes.
bool  Visible (void)
bool  AddCP (const Vector &v, int iIndex=-1)
void  RemoveCP (unsigned int iIndex)
void  MoveCP (unsigned int iIndex, const Vector &v)
void  RecalcKnots (void)
int  GetDegree (void)
void  SetDegree (int iDegree)
Matrix  GetMatrix (void)
void  Display (bool bScreen=true)
void  ProjectPoint (const Vector &vOrig, float fGuess, float &u, Vector &vProjected, float fMin=0.001f, float fMax=0.001f, int iMaxTry=100) const
void  BasisFunction (float u, int i, Store< float > &N) const
void  DeriveBasisFunction (int n, float u, int span, Store< Store< float > > &aDerF) const
int  FindSpan (float u) const
void  DeriveAt (float u, int iDeg, Store< Vector > &aDerivs) const
float  GetMaxParam (void) const
Vector  operator() (float u) const
void  Serialize (Stream &s)
  Serializes the node.
Vector  TransformToWorld (const Vector &v)
Vector  TransformToLocal (const Vector &v)
NURBSCurve operator= (const NURBSCurve &c)
void  PrecalculateValues (void)
void  CalculateChordLengths (void)
float  GetChordPos (float fLength)
void  Close (void)

Public Attributes

  DECLARE_CLASS
int  m_iCPs
int  m_iSelectedCP
bool  m_bEdited
bool  m_bVisible
bool  m_bClosed
bool  m_bPrecalculated
float  m_fTotalLength
float  m_fPosX
float  m_fPosY
float  m_fAngle
float  m_fScale
QString  m_sName
Store< Vector m_aCPs
Store< float >  m_aKnots
Store< float >  m_aPrecalc
NURBSCurve m_pFalloff

Protected Member Functions

void  CalculateChordLength (float fStart, float fEnd)

Protected Attributes

int  m_iDegree
Store< ChordLength m_aChordLengths

Constructor & Destructor Documentation

NURBSCurve ( int  iDegree = 2,
bool  bFalloff = false 
)
~NURBSCurve ( void  )

Member Function Documentation

bool operator== ( const NURBSCurve ) const throw () [inline]

Definition at line 38 of file nurbs.h.

{
bool operator!= ( const NURBSCurve v ) const throw () [inline]

Definition at line 39 of file nurbs.h.

{
void SetVisible ( bool  b ) [inline, virtual]

Sets the node visibility Should be overridden in derived classes.

Reimplemented from TreeNode.

Definition at line 41 of file nurbs.h.

{
bool Visible ( void  ) [inline]

Definition at line 42 of file nurbs.h.

{
bool AddCP ( const Vector v,
int  iIndex = -1 
)
void RemoveCP ( unsigned int  iIndex )
void MoveCP ( unsigned int  iIndex,
const Vector v 
)
void RecalcKnots ( void  )
int GetDegree ( void  ) [inline]

Definition at line 47 of file nurbs.h.

{
void SetDegree ( int  iDegree )
Matrix GetMatrix ( void  )
void Display ( bool  bScreen = true )
void ProjectPoint ( const Vector vOrig,
float  fGuess,
float &  u,
Vector vProjected,
float  fMin = 0.001f,
float  fMax = 0.001f,
int  iMaxTry = 100 
) const
void BasisFunction ( float  u,
int  i,
Store< float > &  N 
) const
void DeriveBasisFunction ( int  n,
float  u,
int  span,
Store< Store< float > > &  aDerF 
) const
int FindSpan ( float  u ) const
void DeriveAt ( float  u,
int  iDeg,
Store< Vector > &  aDerivs 
) const
float GetMaxParam ( void  ) const [inline]

Definition at line 56 of file nurbs.h.

        {
            v += aN[i] * m_aCPs[iSpan-m_iDegree+i];
Vector operator() ( float  u ) const [inline]

Definition at line 62 of file nurbs.h.

    {
        Matrix m = GetMatrix();
        return m.Transform( v );
    };
    inline Vector TransformToLocal( const Vector &v )
    {
        Matrix m = GetMatrix();
        m.Invert();
        return m.Transform( v );
    };
    inline NURBSCurve &operator =( const NURBSCurve &c )
void Serialize ( Stream s ) [virtual]

Serializes the node.

Override this function in your plug-in to save and load attributes and custom data with the Mudbox file.

Reimplemented from TreeNode.

Vector TransformToWorld ( const Vector v ) [inline]

Definition at line 79 of file nurbs.h.

         :
    int m_iDegree;
Vector TransformToLocal ( const Vector v ) [inline]

Definition at line 84 of file nurbs.h.

         :
    int m_iDegree;
NURBSCurve& operator= ( const NURBSCurve c ) [inline]

Definition at line 90 of file nurbs.h.

         :
    int m_iDegree;
void PrecalculateValues ( void  )
void CalculateChordLengths ( void  )
float GetChordPos ( float  fLength )
void Close ( void  )
void CalculateChordLength ( float  fStart,
float  fEnd 
) [protected]

Member Data Documentation

Reimplemented from GroupNode.

Definition at line 33 of file nurbs.h.

int m_iCPs

Definition at line 119 of file nurbs.h.

Definition at line 119 of file nurbs.h.

Definition at line 120 of file nurbs.h.

Reimplemented from TreeNode.

Definition at line 120 of file nurbs.h.

Definition at line 120 of file nurbs.h.

Definition at line 120 of file nurbs.h.

Definition at line 121 of file nurbs.h.

float m_fPosX

Definition at line 122 of file nurbs.h.

float m_fPosY

Definition at line 122 of file nurbs.h.

float m_fAngle

Definition at line 122 of file nurbs.h.

float m_fScale

Definition at line 122 of file nurbs.h.

QString m_sName

Definition at line 123 of file nurbs.h.

Definition at line 125 of file nurbs.h.

Definition at line 126 of file nurbs.h.

int m_iDegree [protected]

Definition at line 130 of file nurbs.h.

Definition at line 138 of file nurbs.h.


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

NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve
NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve NURBSCurve