Handles the TKE_Cylinder opcode. More...
#include <BOpcodeHandler.h>
Public Types | |
enum | Capping_Options { TKCYL_NONE = 0, TKCYL_FIRST = 1, TKCYL_SECOND = 2, TKCYL_BOTH = 3 } |
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
float const * | GetAxis () const |
int | GetCaps () const |
double const * | GetDAxis () const |
double const * | GetDEnd () const |
double | GetDRadius () const |
double const * | GetDStart () const |
float const * | GetEnd () const |
float | GetRadius () const |
float const * | GetStart () const |
TK_Status | Read (BStreamFileToolkit &tk) |
TK_Status | ReadAscii (BStreamFileToolkit &tk) |
Deprecated. | |
void | SetAxis (float x1, float y1, float z1, float x2, float y2, float z2) |
void | SetAxis (float const *s, float const *e) |
void | SetAxis (float const *a) |
void | SetCaps (int f) |
void | SetDAxis (double x1, double y1, double z1, double x2, double y2, double z2) |
void | SetDAxis (double const *s, double const *e) |
void | SetDAxis (double const *a) |
void | SetDRadius (double r) |
void | SetRadius (float r) |
TK_Cylinder () | |
TK_Status | Write (BStreamFileToolkit &tk) |
TK_Status | WriteAscii (BStreamFileToolkit &tk) |
Deprecated. | |
Protected Attributes | |
float | m_axis [6] |
double | m_daxis [6] |
double | m_dradius |
unsigned char | m_flags |
float | m_radius |
Handles the TKE_Cylinder opcode.
TK_Cylinder provides support for writing/reading the TKE_Cylinder opcode object to/from an HSF file.
The HOOPS/3dGS scene-graph can contain 'cylinder' primitives which are defined by two points representing the axis, the radius, and flags indicating which ends are 'capped'.
TK_Cylinder::TK_Cylinder | ( | ) | [inline] |
constructor
TK_Status TK_Cylinder::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.
Reimplemented in HTK_Cylinder.
float const* TK_Cylinder::GetAxis | ( | ) | const [inline] |
Returns the axis as the address of a float array
int TK_Cylinder::GetCaps | ( | ) | const [inline] |
Returns the capping_options of the cylinder
double const* TK_Cylinder::GetDAxis | ( | ) | const [inline] |
Returns the axis as the address of a double array
double const* TK_Cylinder::GetDEnd | ( | ) | const [inline] |
Returns the axis end point as the address of a double array
double TK_Cylinder::GetDRadius | ( | ) | const [inline] |
Returns the radius of the cylinder
double const* TK_Cylinder::GetDStart | ( | ) | const [inline] |
Returns the axis start point as the address of a double array
float const* TK_Cylinder::GetEnd | ( | ) | const [inline] |
Returns the axis end point as the address of a float array
float TK_Cylinder::GetRadius | ( | ) | const [inline] |
Returns the radius of the cylinder
float const* TK_Cylinder::GetStart | ( | ) | const [inline] |
Returns the axis start point as the address of a float array
TK_Status TK_Cylinder::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_Cylinder::SetAxis | ( | float | x1, |
float | y1, | ||
float | z1, | ||
float | x2, | ||
float | y2, | ||
float | z2 | ||
) | [inline] |
Sets the axis of the cylinder using discrete float values
void TK_Cylinder::SetAxis | ( | float const * | s, |
float const * | e | ||
) | [inline] |
void TK_Cylinder::SetAxis | ( | float const * | a | ) | [inline] |
void TK_Cylinder::SetCaps | ( | int | f | ) | [inline] |
Sets the capping options of the cylinder
void TK_Cylinder::SetDAxis | ( | double | x1, |
double | y1, | ||
double | z1, | ||
double | x2, | ||
double | y2, | ||
double | z2 | ||
) | [inline] |
Sets the axis of the cylinder using discrete double values
void TK_Cylinder::SetDAxis | ( | double const * | s, |
double const * | e | ||
) | [inline] |
Sets the axis of the cylinder using a 2 double triplets
References SetDAxis().
Referenced by SetDAxis().
void TK_Cylinder::SetDAxis | ( | double const * | a | ) | [inline] |
void TK_Cylinder::SetDRadius | ( | double | r | ) | [inline] |
Sets the radius of the cylinder
void TK_Cylinder::SetRadius | ( | float | r | ) | [inline] |
Sets the radius of the cylinder
TK_Status TK_Cylinder::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.
float TK_Cylinder::m_axis[6] [protected] |
internal use; Axis endpoints
double TK_Cylinder::m_daxis[6] [protected] |
internal use; Axis endpoints
double TK_Cylinder::m_dradius [protected] |
internal use; Radius
unsigned char TK_Cylinder::m_flags [protected] |
internal use; Caps
float TK_Cylinder::m_radius [protected] |
internal use; Radius