22 NURBSCurve(
int iDegree = 2,
bool bFalloff =
false );
28 void SetVisible(
bool bVisible ) { m_bVisible = bVisible; };
29 bool Visible(
void ) {
return m_bVisible; };
30 bool AddCP(
const Vector &
v,
int iIndex = -1 );
31 void RemoveCP(
unsigned int iIndex );
32 void MoveCP(
unsigned int iIndex,
const Vector &
v );
34 void RecalcKnots(
void );
36 void SetDegree(
int iDegree );
38 void Display(
bool bScreen =
true );
39 virtual void Render();
41 void ProjectPoint(
const Vector &vOrig,
float fGuess,
float &u,
Vector &vProjected,
float fMin = 0.001
f,
float fMax = 0.001
f,
int iMaxTry = 100 )
const;
42 void BasisFunction(
float u,
int i,
Store<float> &N )
const;
44 int FindSpan(
float u )
const;
45 void DeriveAt(
float u,
int iDeg,
Store<Vector> &aDerivs )
const;
48 if( m_aKnots.ItemCount() == 0 )
50 return m_aKnots[m_aKnots.ItemCount()-1];
55 if( m_iCPs <= m_iDegree )
59 int iSpan = FindSpan(u);
60 BasisFunction( u, iSpan, aN );
62 for(
int i = m_iDegree; i >= 0; --i )
64 v += aN[i] * m_aCPs[iSpan-m_iDegree+i];
104 void PrecalculateValues(
void );
105 virtual void CalculateChordLengths(
void );
106 float GetChordPos(
float fLength );
124 ChordLength(
float fPos = 0.0
f,
float fLength = 0.0
f ) {m_fPos = fPos; m_fLength = fLength;};
125 float m_fPos, m_fLength;
127 virtual void CalculateChordLength(
float fStart,
float fEnd );
136 void Refresh(
void );
137 void OnMouseClick(
float fX,
float fY );
138 void OnMouseRelease(
float fX,
float fY );
139 void OnMouseMove(
float fX,
float fY );
140 void OnDelete(
void );
141 void MoveCPTo(
const Vector &
v );
149 bool bInAdjustColor =
false );
Store< float > m_aPrecalc
Represents a 3D vector or point with S23E8 floating point elements.
typedefQT_END_NAMESPACE QT_END_HEADER struct _XDisplay Display
Base class for Curve types.
float GetMaxParam(void) const
Vector operator()(float u) const
Vector TransformToLocal(const Vector &v)
This is the base class for most classes in the Mudbox SDK.
Matrix & Invert(bool *pOk=0)
Inverts the matrix and returns it.
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
void SetVisible(bool bVisible)
Sets the node visibility Should be overridden in derived classes.
This class represents a 4x4 transformation matrix.
bool operator!=(const QByteArray &a1, const QByteArray &a2)
Store< ChordLength > m_aChordLengths
Vector Transform(const Vector &v, float fW=1.0f) const
Transforms a vector by the matrix and returns the result.
Store Clone(void) const
Returns a copy of this array. The returned copy will have a duplicate of all data in the original...
Class: ConvolutionKernel.
This is an abstract base structure for all attributes.
Vector TransformToWorld(const Vector &v)
Streams are used to read information from a file, or to write it to a file.
GLsizei const GLfloat * points
GLenum GLenum GLvoid GLvoid GLvoid * span
AttributeCurvePointer(Node *pOwner=0, const QString &sID="")
MBDLL_DECL AttributeWidget * CreateNewCurveWidget(QWidget *pParent, int iWidth, Attribute *pAttribute, bool bAddSnapAndStoreTo=true, bool bInAdjustColor=false)
AttributeCurvePointer acurveptr
void SetPointerValue(NURBSCurve *cValue, bool bX=false)
This class can be used instead of standard pointers, when the pointer target class is derived from th...