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
float GetEnd () const
float const * GetKnots () const
float alter * GetKnots () alter
int GetOptions () const
float const * GetPoints () const
float alter * GetPoints () alter
float GetStart () const
float const * GetWeights () const
float alter * GetWeights () alter
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status ReadAscii (BStreamFileToolkit &tk) alter
 Deprecated.
void Reset () alter
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) alter
 sets the curve properties
void SetEnd (float e) alter
void SetOptions (int o) alter
void SetStart (float s) alter
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status WriteAscii (BStreamFileToolkit &tk) alter
 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) alter
 internal use

Protected Attributes

int m_control_point_count
float * m_control_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.

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 alter* 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 alter* 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 alter* 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

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: