Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

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 3614 of file BOpcodeHandler.h.

Public Member Functions

TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
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

int TK_NURBS_Curve::GetCount void   )  const [inline]
 

Gets the control point count.

Definition at line 3651 of file BOpcodeHandler.h.

int TK_NURBS_Curve::GetDegree void   )  const [inline]
 

Gets the degree of the curve.

Definition at line 3650 of file BOpcodeHandler.h.

float TK_NURBS_Curve::GetEnd void   )  const [inline]
 

Gets the end point of the curve.

Definition at line 3662 of file BOpcodeHandler.h.

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

Gets a mutable pointer to the knots

Definition at line 3657 of file BOpcodeHandler.h.

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

Gets a constant pointer to the curve knots

Definition at line 3656 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 3665 of file BOpcodeHandler.h.

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

Gets a mutable pointer to the control points

Definition at line 3653 of file BOpcodeHandler.h.

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

Gets a constant pointer to the control points

Definition at line 3652 of file BOpcodeHandler.h.

float TK_NURBS_Curve::GetStart void   )  const [inline]
 

Gets the start point of the curve.

Definition at line 3660 of file BOpcodeHandler.h.

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

Gets a mutable pointer to the control point weights

Definition at line 3655 of file BOpcodeHandler.h.

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

Gets a constant to the control point weights

Definition at line 3654 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 3661 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 3664 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 3659 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 3623 of file BOpcodeHandler.h.

float* TK_NURBS_Curve::m_control_points [protected]
 

internal use; array of floats for control point coordinates

Definition at line 3625 of file BOpcodeHandler.h.

unsigned char TK_NURBS_Curve::m_degree [protected]
 

internal use; degree of the curve

Definition at line 3622 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 3629 of file BOpcodeHandler.h.

int TK_NURBS_Curve::m_knot_count_implicit [protected]
 

internal use; always (m_controlpointcount + m_degree + 1)

Definition at line 3624 of file BOpcodeHandler.h.

float* TK_NURBS_Curve::m_knots [protected]
 

internal use; array of floats for the curve knot vector

Definition at line 3627 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 3621 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 3628 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 3626 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:06:11 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1