TK_PolyCylinder
-
class
TK_PolyCylinder Handles the TKE_PolyCylinder opcode.
TK_PolyCylinderprovides support for writing/reading the TKE_PolyCylinder opcode object to/from an HSF file.The HOOPS/3dGS scene-graph can contain ‘polycylinder’ primitives which are defined by a series of points representing the centerline, radius at each point, and flags indicating which ends are ‘capped’.
Inherits from:
TK_PolyhedronIndex
Methods
Clone()GetCaps()GetCount()GetDPoints()GetDPoints()GetDRadii()GetDRadii()GetEndNormal()GetPoints()GetPoints()GetRadii()GetRadii()GetRadiusCount()Read()ReadAscii()Reset()SetCaps()SetDPoints()SetDRadii()SetDRadius()SetEndNormal()SetPoints()SetRadii()SetRadius()TK_PolyCylinder()Write()WriteAscii()~TK_PolyCylinder()
Variables
Enumerations
Methods
-
TK_PolyCylinder::TK_PolyCylinder() constructor
-
TK_PolyCylinder::~TK_PolyCylinder()
-
TK_Status
TK_PolyCylinder::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_PolyCylinder::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_PolyCylinder::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_PolyCylinder::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_PolyCylinder::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
virtual void
TK_PolyCylinder::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.
-
void
TK_PolyCylinder::SetPoints(int count, float const points[] = 0) Sets the point array. Allocates a buffer which will hold ‘count’ float triplets, and if specified, copies the ‘points’ into the buffer
-
float const *
TK_PolyCylinder::GetPoints() const const
Returns the address of the point buffer
-
float *
TK_PolyCylinder::GetPoints() Returns the address of the point buffer, which may be modified directly
-
void
TK_PolyCylinder::SetRadii(int count, float const radii[] = 0) Sets the radius array. Allocates a buffer which will hold ‘count’ floats, and if specified, copies the ‘radii’ into the buffer
-
void
TK_PolyCylinder::SetRadius(float radius) Convenience function to set a single radius
-
float const *
TK_PolyCylinder::GetRadii() const const
Returns the address of the point buffer
-
float *
TK_PolyCylinder::GetRadii() Returns the address of the point buffer, which may be modified directly
-
void
TK_PolyCylinder::SetDPoints(int count, double const points[] = 0) Sets the point array. Allocates a buffer which will hold ‘count’ double triplets, and if specified, copies the ‘points’ into the buffer
-
double const *
TK_PolyCylinder::GetDPoints() const const
Returns the address of the point buffer
-
double *
TK_PolyCylinder::GetDPoints() Returns the address of the point buffer, which may be modified directly
-
void
TK_PolyCylinder::SetDRadii(int count, double const radii[] = 0) Sets the radius array. Allocates a buffer which will hold ‘count’ double, and if specified, copies the ‘radii’ into the buffer
-
void
TK_PolyCylinder::SetDRadius(double radius) Convenience function to set a single radius
-
double const *
TK_PolyCylinder::GetDRadii() const const
Returns the address of the point buffer
-
double *
TK_PolyCylinder::GetDRadii() Returns the address of the point buffer, which may be modified directly
-
int
TK_PolyCylinder::GetCount() const const
Returns the number of points in the buffer
-
int
TK_PolyCylinder::GetRadiusCount() const const
Returns the number of radii in the buffer
-
void
TK_PolyCylinder::SetCaps(int f) Sets the capping options of the cylinder
-
int
TK_PolyCylinder::GetCaps() const const
Returns the capping options of the cylinder
-
void
TK_PolyCylinder::SetEndNormal(int index, float const normal[] = 0) Sets (or clears) the normal associated with an end of the polycylinder
-
float const *
TK_PolyCylinder::GetEndNormal(int index) const const
Returns the normal associated with an end of the polycylinder (0 if none)
Variables
-
int
TK_PolyCylinder::m_count protected
intinternal use; Number of 3D points that define this polycylinder object
-
float *
TK_PolyCylinder::m_points protected
floatinternal use; Array of floats which denote the point coordinates.
-
double *
TK_PolyCylinder::m_dpoints protected
doubleinternal use; Array of floats which denote the point coordinates.
-
int
TK_PolyCylinder::m_radius_count protected
intinternal use; Number of radii associated with the points
-
float *
TK_PolyCylinder::m_radii protected
floatinternal use; Array of floats which denote the radii.
-
double *
TK_PolyCylinder::m_dradii protected
doubleinternal use; Array of floats which denote the radii.
-
unsigned char
TK_PolyCylinder::m_flags protected
unsigned charinternal use; Caps, normals, colors
-
float
TK_PolyCylinder::m_normals[6] protected
floatinternal use; Normals of end caps