TK_NURBS_Curve

class TK_NURBS_Curve

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

Inherits from: BBaseOpcodeHandler

Methods

void TK_NURBS_Curve::set_curve(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)

protected

internal use

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

virtual

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.
TK_Status TK_NURBS_Curve::Write(BStreamFileToolkit &tk)

virtual

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.
TK_Status TK_NURBS_Curve::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

const virtual

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 TK_NURBS_Curve::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_NURBS_Curve::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_NURBS_Curve::Reset()

virtual

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.

void TK_NURBS_Curve::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 TK_NURBS_Curve::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)
float const *TK_NURBS_Curve::GetPoints() const

const

Gets a constant pointer to the control points

float *TK_NURBS_Curve::GetPoints()

Gets a mutable pointer to the control points

double const *TK_NURBS_Curve::GetDPoints() const

const

Gets a constant pointer to the control points

double *TK_NURBS_Curve::GetDPoints()

Gets a mutable pointer to the control points

int TK_NURBS_Curve::GetDegree() const

const

Gets the degree of the curve.

int TK_NURBS_Curve::GetCount() const

const

Gets the control point count.

float const *TK_NURBS_Curve::GetWeights() const

const

Gets a constant to the control point weights

float *TK_NURBS_Curve::GetWeights()

Gets a mutable pointer to the control point weights

float const *TK_NURBS_Curve::GetKnots() const

const

Gets a constant pointer to the curve knots

float *TK_NURBS_Curve::GetKnots()

Gets a mutable pointer to the knots

void TK_NURBS_Curve::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.

float TK_NURBS_Curve::GetStart() const

const

Gets the start point of the curve.

void TK_NURBS_Curve::SetEnd(float e)

Sets the end point of the curve.

float TK_NURBS_Curve::GetEnd() const

const

Gets the end point of the curve.

void TK_NURBS_Curve::SetOptions(int o)

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

int TK_NURBS_Curve::GetOptions() const

const

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

Variables

unsigned char TK_NURBS_Curve::m_optionals

protected

unsigned char

internal use; bit field to show which optional fields are present

unsigned char TK_NURBS_Curve::m_degree

protected

unsigned char

internal use; degree of the curve

int TK_NURBS_Curve::m_control_point_count

protected

int

internal use; number of control points

int TK_NURBS_Curve::m_knot_count_implicit

protected

int

internal use; always (m_controlpointcount + m_degree + 1)

float *TK_NURBS_Curve::m_control_points

protected

float

internal use; array of floats for control point coordinates

double *TK_NURBS_Curve::m_dcontrol_points

protected

double

internal use; array of doubles for control point coordinates

float *TK_NURBS_Curve::m_weights

protected

float

internal use; array of weights to apply to the control points

float *TK_NURBS_Curve::m_knots

protected

float

internal use; array of floats for the curve knot vector

float TK_NURBS_Curve::m_start

protected

float

internal use; where the curve starts in parametric [0,1] space

float TK_NURBS_Curve::m_end

protected

float

internal use; where the curve ends in parametric [0,1] space