TK_NURBS_Curve Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_NURBS_Curve:

Inheritance graph
[legend]
Collaboration diagram for TK_NURBS_Curve:

Collaboration graph
[legend]
List of all members.

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

Definition at line 5679 of file BOpcodeHandler.h.

Public Member Functions

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

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

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


Member Function Documentation

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

Reimplemented from BBaseOpcodeHandler.

int TK_NURBS_Curve::GetCount void   )  const [inline]
 

Gets the control point count.

Definition at line 5721 of file BOpcodeHandler.h.

int TK_NURBS_Curve::GetDegree void   )  const [inline]
 

Gets the degree of the curve.

Definition at line 5720 of file BOpcodeHandler.h.

float TK_NURBS_Curve::GetEnd void   )  const [inline]
 

Gets the end point of the curve.

Definition at line 5732 of file BOpcodeHandler.h.

float alter* TK_NURBS_Curve::GetKnots void   )  [inline]
 

Gets a mutable pointer to the knots

Definition at line 5727 of file BOpcodeHandler.h.

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

Gets a constant pointer to the curve knots

Definition at line 5726 of file BOpcodeHandler.h.

int TK_NURBS_Curve::GetOptions void   )  const [inline]
 

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

Definition at line 5735 of file BOpcodeHandler.h.

float alter* TK_NURBS_Curve::GetPoints void   )  [inline]
 

Gets a mutable pointer to the control points

Definition at line 5723 of file BOpcodeHandler.h.

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

Gets a constant pointer to the control points

Definition at line 5722 of file BOpcodeHandler.h.

float TK_NURBS_Curve::GetStart void   )  const [inline]
 

Gets the start point of the curve.

Definition at line 5730 of file BOpcodeHandler.h.

float alter* TK_NURBS_Curve::GetWeights void   )  [inline]
 

Gets a mutable pointer to the control point weights

Definition at line 5725 of file BOpcodeHandler.h.

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

Gets a constant to the control point weights

Definition at line 5724 of file BOpcodeHandler.h.

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.

Implements BBaseOpcodeHandler.

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

Definition at line 5731 of file BOpcodeHandler.h.

void TK_NURBS_Curve::SetOptions int  o  )  [inline]
 

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

Definition at line 5734 of file BOpcodeHandler.h.

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.

Definition at line 5729 of file BOpcodeHandler.h.

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.

Implements BBaseOpcodeHandler.


Member Data Documentation

int TK_NURBS_Curve::m_control_point_count [protected]
 

internal use; number of control points

Definition at line 5688 of file BOpcodeHandler.h.

float* TK_NURBS_Curve::m_control_points [protected]
 

internal use; array of floats for control point coordinates

Definition at line 5690 of file BOpcodeHandler.h.

unsigned char TK_NURBS_Curve::m_degree [protected]
 

internal use; degree of the curve

Definition at line 5687 of file BOpcodeHandler.h.

float TK_NURBS_Curve::m_end [protected]
 

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

Definition at line 5694 of file BOpcodeHandler.h.

int TK_NURBS_Curve::m_knot_count_implicit [protected]
 

internal use; always (m_controlpointcount + m_degree + 1)

Definition at line 5689 of file BOpcodeHandler.h.

float* TK_NURBS_Curve::m_knots [protected]
 

internal use; array of floats for the curve knot vector

Definition at line 5692 of file BOpcodeHandler.h.

unsigned char TK_NURBS_Curve::m_optionals [protected]
 

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

Definition at line 5686 of file BOpcodeHandler.h.

float TK_NURBS_Curve::m_start [protected]
 

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

Definition at line 5693 of file BOpcodeHandler.h.

float* TK_NURBS_Curve::m_weights [protected]
 

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

Definition at line 5691 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:44 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5