TK_NURBS_Curve

Functions

TK_NURBS_Curve
~TK_NURBS_Curve
TK_Status Read
TK_Status Write
TK_Status Clone
TK_Status ReadAscii
TK_Status WriteAscii
void Reset
void SetCurve
void SetDCurve
float const * GetPoints
float * GetPoints
double const * GetDPoints
double * GetDPoints
int GetDegree
int GetCount
float const * GetWeights
float * GetWeights
float const * GetKnots
float * GetKnots
void SetStart
float GetStart
void SetEnd
float GetEnd
void SetOptions
int GetOptions

Detailed Description

class TK_NURBS_Curve : public BBaseOpcodeHandler

Handles the TKE_NURBS_Curve opcode.

TK_NURBS_Curve provides support for writing/reading the TKE_NURBS_Curve opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph supports NURBS curve primitives

Subclassed by HTK_NURBS_Curve

Public Functions

TK_NURBS_Curve()
~TK_NURBS_Curve()
virtual TK_Status Read(BStreamFileToolkit &tk)

Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.

Parameters:tk – A reference to the BStreamFileToolkit object.
Returns:The result of the function call.
virtual TK_Status Write(BStreamFileToolkit &tk)

Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.

Parameters:tk – A reference to the BStreamFileToolkit object.
Returns:The result of the function call.
virtual TK_Status Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

Copies the opcode handler

Parameters:
  • tk – A reference to the BStreamFileToolkit object.
  • handler – A pointer to the opcode handler object. Passed by reference.
Returns:

The result of the function call.

TK_Status ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status WriteAscii(BStreamFileToolkit &tk)

Deprecated.

virtual void Reset()

Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

inline void SetCurve(int degree, int control_count, float const points[] = 0, float const weights[] = 0, float const knots[] = 0, float start = 0.0f, float end = 1.0f)

sets the curve properties

void SetDCurve(int degree, int control_count, double const points[] = 0, float const weights[] = 0, float const knots[] = 0, float start = 0.0f, float end = 1.0f)
inline float const *GetPoints() const

Gets a constant pointer to the control points

inline float *GetPoints()

Gets a mutable pointer to the control points

inline double const *GetDPoints() const

Gets a constant pointer to the control points

inline double *GetDPoints()

Gets a mutable pointer to the control points

inline int GetDegree() const

Gets the degree of the curve.

inline int GetCount() const

Gets the control point count.

inline float const *GetWeights() const

Gets a constant to the control point weights

inline float *GetWeights()

Gets a mutable pointer to the control point weights

inline float const *GetKnots() const

Gets a constant pointer to the curve knots

inline float *GetKnots()

Gets a mutable pointer to the knots

inline void SetStart(float s)

Sets the start point of the curve. This, unlike some solid modelers, is parameterized from 0 to 1, an not with respect to whatever is in the knot vector.

inline float GetStart() const

Gets the start point of the curve.

inline void SetEnd(float e)

Sets the end point of the curve.

inline float GetEnd() const

Gets the end point of the curve.

inline void SetOptions(int o)

Sets the bit flags to declare which optional values are present.

inline int GetOptions() const

Gets the bit flags to show what optional values are present.