#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
int | GetCount () const |
int | GetDegree () const |
float | GetEnd () const |
float alter * | GetKnots () alter |
float const * | GetKnots () const |
int | GetOptions () const |
float alter * | GetPoints () alter |
float const * | GetPoints () const |
float | GetStart () const |
float alter * | GetWeights () alter |
float const * | GetWeights () const |
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 |
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
TK_Status TK_NURBS_Curve::Clone | ( | BStreamFileToolkit & | tk, | |
BBaseOpcodeHandler ** | handler | |||
) | const [virtual] |
Copies the opcode handler
tk | A reference to the BStreamFileToolkit object. | |
handler | A pointer to the opcode handler object. Passed by reference. |
Reimplemented from BBaseOpcodeHandler.
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 alter* TK_NURBS_Curve::GetKnots | ( | ) | [inline] |
Gets a mutable pointer to the knots
float const* TK_NURBS_Curve::GetKnots | ( | ) | const [inline] |
Gets a constant pointer to the curve knots
int TK_NURBS_Curve::GetOptions | ( | ) | const [inline] |
Gets the bit flags to show what optional values are present.
float alter* TK_NURBS_Curve::GetPoints | ( | ) | [inline] |
Gets a mutable pointer to the control points
float const* TK_NURBS_Curve::GetPoints | ( | ) | const [inline] |
Gets a constant pointer to the control points
float TK_NURBS_Curve::GetStart | ( | ) | const [inline] |
Gets the start point of the curve.
float alter* TK_NURBS_Curve::GetWeights | ( | ) | [inline] |
Gets a mutable pointer to the control point weights
float const* TK_NURBS_Curve::GetWeights | ( | ) | const [inline] |
Gets a constant 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.
tk | A reference to the BStreamFileToolkit object. |
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.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
int TK_NURBS_Curve::m_control_point_count [protected] |
internal use; number of control points
float* TK_NURBS_Curve::m_control_points [protected] |
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
int TK_NURBS_Curve::m_knot_count_implicit [protected] |
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