TK_NURBS_Surface
-
class
TK_NURBS_Surface Handles the TKE_NURBS_Surface opcode.
TK_NURBS_Surfaceprovides support for writing/reading the TKE_NURBS_Surface opcode object to/from an HSF file.The HOOPS/3dGS scene-graph supports NURBS surface primitives
Inherits from:
BBaseOpcodeHandlerIndex
Methods
Clone()GetDPoints()GetDPoints()GetOptions()GetPoints()GetPoints()GetTrims()GetUDegree()GetUKnots()GetUKnots()GetUSize()GetVDegree()GetVKnots()GetVKnots()GetVSize()GetWeights()GetWeights()NewTrim()Read()ReadAscii()Reset()SetDSurface()SetOptions()SetSurface()TK_NURBS_Surface()Write()WriteAscii()~TK_NURBS_Surface()
Variables
Methods
-
TK_NURBS_Surface::TK_NURBS_Surface()
-
TK_NURBS_Surface::~TK_NURBS_Surface()
-
TK_Status
TK_NURBS_Surface::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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_NURBS_Surface::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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_NURBS_Surface::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const const virtual
Copies the opcode handler
Parameters
tk: A reference to the
BStreamFileToolkitobject.handler: A pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.
-
TK_Status
TK_NURBS_Surface::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_NURBS_Surface::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_NURBS_Surface::Reset() virtual
prepares the handler for reuse during reading or writing
-
void
TK_NURBS_Surface::SetSurface(int u_degree, int v_degree, int u_size, int v_size, float const points[] = 0, float const weights[] = 0, float const u_knots[] = 0, float const v_knots[] = 0) allocates all of the arrays that could be present in a nurbs surface (even if they are eventually left unused), and copies whatever data is given.
-
void
TK_NURBS_Surface::SetDSurface(int u_degree, int v_degree, int u_size, int v_size, double const points[] = 0, float const weights[] = 0, float const u_knots[] = 0, float const v_knots[] = 0) allocates all of the arrays that could be present in a nurbs surface (even if they are eventually left unused), and copies whatever data is given.
-
float const *
TK_NURBS_Surface::GetPoints() const const
returns a const pointer to the array of floats for control point coordinates
-
float *
TK_NURBS_Surface::GetPoints() returns a mutable pointer to the array of floats for control point coordinates
-
double const *
TK_NURBS_Surface::GetDPoints() const const
returns a const pointer to the array of doubles for control point coordinates
-
double *
TK_NURBS_Surface::GetDPoints() returns a mutable pointer to the array of doubles for control point coordinates
-
int
TK_NURBS_Surface::GetUDegree() const const
gets the degree in the U direction of the NURBS Surface.
-
int
TK_NURBS_Surface::GetVDegree() const const
gets the degree in the V direction of the NURBS Surface. Note that it need not be the same as the U direction (e.g. a cylinder is linear in one direction)
-
int
TK_NURBS_Surface::GetUSize() const const
gets the number of control points in the U direction
-
int
TK_NURBS_Surface::GetVSize() const const
gets the number of control points in the V direction
-
float const *
TK_NURBS_Surface::GetWeights() const const
returns a const pointer to the array of weights to apply to the control points
-
float *
TK_NURBS_Surface::GetWeights() returns a mutable pointer to the array of weights to apply to the control points
-
float const *
TK_NURBS_Surface::GetUKnots() const const
returns a const pointer to the array of floats for the surface knot vector in the u direction. Of length
GetUDegree()+GetUSize()+ 1.
-
float *
TK_NURBS_Surface::GetUKnots() returns a mutable pointer to the array of floats for the surface knot vector in the u direction. Of length
GetUDegree()+GetUSize()+ 1.
-
float const *
TK_NURBS_Surface::GetVKnots() const const
returns a const pointer to the array of floats for the surface knot vector in the v direction. Of length
GetVDegree()+GetVSize()+ 1.
-
float *
TK_NURBS_Surface::GetVKnots() returns a mutable pointer to the array of floats for the surface knot vector in the v direction. Of length
GetVDegree()+GetVSize()+ 1.
-
void
TK_NURBS_Surface::SetOptions(int o) sets the bit flags to indicate the presence of the various optional values of the NURBS Surface. Currently defined bit values are NS_HAS_WEIGHTS, NS_HAS_KNOTS, and NS_HAS_TRIMS.
-
int
TK_NURBS_Surface::GetOptions() const const
gets the bit flags to indicate the presence of the various optional values of the NURBS Surface. Currently defined bit values are NS_HAS_WEIGHTS, NS_HAS_KNOTS, and NS_HAS_TRIMS.
-
HT_NURBS_Trim *
TK_NURBS_Surface::NewTrim(int type = NS_TRIM_END) creates a new instance of an
HT_NURBS_Trimobject to handle trims
-
HT_NURBS_Trim *
TK_NURBS_Surface::GetTrims() returns a mutable pointer to the head of the linked list of trims
Variables
-
unsigned char
TK_NURBS_Surface::m_optionals protected
unsigned charinternal use; bit field to show which optional fields are present
-
unsigned char
TK_NURBS_Surface::m_degree[2] protected
unsigned charinternal use; degree of the curve (u,v)
-
int
TK_NURBS_Surface::m_size[2] protected
intinternal use; number of control points (u,v)
-
float *
TK_NURBS_Surface::m_control_points protected
floatinternal use; array of floats for control point coordinates
-
double *
TK_NURBS_Surface::m_dcontrol_points protected
doubleinternal use; array of doubles for control point coordinates
-
float *
TK_NURBS_Surface::m_weights protected
floatinternal use; array of weights to apply to the control points
-
float *
TK_NURBS_Surface::m_u_knots protected
floatinternal use; array of floats for the surface knot vector in the u direction. Of length
GetUDegree()+GetUSize()+ 1.
-
float *
TK_NURBS_Surface::m_v_knots protected
floatinternal use; array of floats for the surface knot vector in the v direction. Of length
GetVDegree()+GetVSize()+ 1.
-
HT_NURBS_Trim *
TK_NURBS_Surface::m_trims protected
internal use; a linked list of trimming objects. These may be of type NS_TRIM_POLY, NS_TRIM_CURVE or NS_TRIM_COLLECTION
-
HT_NURBS_Trim *
TK_NURBS_Surface::m_current_trim protected
internal use; tracks the progress of reading or writing the triming objects