Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_NURBS_Curve Class Reference

Handles the TKE_NURBS_Curve opcode. More...

#include <BOpcodeHandler.h>

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
int GetCount () const
int GetDegree () const
double const * GetDPoints () const
double * GetDPoints ()
float GetEnd () const
float const * GetKnots () const
float * GetKnots ()
int GetOptions () const
float const * GetPoints () const
float * GetPoints ()
float GetStart () const
float const * GetWeights () const
float * GetWeights ()
TK_Status Read (BStreamFileToolkit &tk)
TK_Status ReadAscii (BStreamFileToolkit &tk)
 Deprecated.
void Reset ()
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)
void SetEnd (float e)
void SetOptions (int o)
void SetStart (float s)
TK_Status Write (BStreamFileToolkit &tk)
TK_Status WriteAscii (BStreamFileToolkit &tk)
 Deprecated.

Protected Member Functions

void 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)
 internal use

Protected Attributes

int m_control_point_count
float * m_control_points
double * m_dcontrol_points
unsigned char m_degree
float m_end
int m_knot_count_implicit
float * m_knots
unsigned char m_optionals
float m_start
float * m_weights

Detailed Description

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


Member Function Documentation

TK_Status TK_NURBS_Curve::Clone ( BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler 
) const [virtual]

Copies the opcode handler

Parameters:
tkA reference to the BStreamFileToolkit object.
handlerA pointer to the opcode handler object. Passed by reference.
Returns:
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

Reimplemented in HTK_NURBS_Curve.

int TK_NURBS_Curve::GetCount ( ) const [inline]

Gets the control point count.

int TK_NURBS_Curve::GetDegree ( ) const [inline]

Gets the degree of the curve.

double const* TK_NURBS_Curve::GetDPoints ( ) const [inline]

Gets a constant pointer to the control points

double* TK_NURBS_Curve::GetDPoints ( ) [inline]

Gets a mutable pointer to the control points

float TK_NURBS_Curve::GetEnd ( ) const [inline]

Gets the end point of the curve.

float const* TK_NURBS_Curve::GetKnots ( ) const [inline]

Gets a constant pointer to the curve knots

float* TK_NURBS_Curve::GetKnots ( ) [inline]

Gets a mutable pointer to the knots

int TK_NURBS_Curve::GetOptions ( ) const [inline]

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

float const* TK_NURBS_Curve::GetPoints ( ) const [inline]

Gets a constant pointer to the control points

float* TK_NURBS_Curve::GetPoints ( ) [inline]

Gets a mutable pointer to the control points

float TK_NURBS_Curve::GetStart ( ) const [inline]

Gets the start point of the curve.

float const* TK_NURBS_Curve::GetWeights ( ) const [inline]

Gets a constant to the control point weights

float* TK_NURBS_Curve::GetWeights ( ) [inline]

Gets a mutable pointer to the control point weights

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:
tkA reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.

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.

Reimplemented from BBaseOpcodeHandler.

void TK_NURBS_Curve::SetEnd ( float  e) [inline]

Sets the end point of the curve.

void TK_NURBS_Curve::SetOptions ( int  o) [inline]

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

void TK_NURBS_Curve::SetStart ( float  s) [inline]

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.

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:
tkA reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.


Member Data Documentation

internal use; number of control points

internal use; array of floats for control point coordinates

double* TK_NURBS_Curve::m_dcontrol_points [protected]

internal use; array of doubles for control point coordinates

unsigned char TK_NURBS_Curve::m_degree [protected]

internal use; degree of the curve

float TK_NURBS_Curve::m_end [protected]

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

internal use; always (m_controlpointcount + m_degree + 1)

float* TK_NURBS_Curve::m_knots [protected]

internal use; array of floats for the curve knot vector

unsigned char TK_NURBS_Curve::m_optionals [protected]

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

float TK_NURBS_Curve::m_start [protected]

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

float* TK_NURBS_Curve::m_weights [protected]

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


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