Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

Public Types | Public Member Functions | Protected Attributes
TK_Cylinder Class Reference

Handles the TKE_Cylinder opcode. More...

#include <BOpcodeHandler.h>

List of all members.

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
float const * GetEnd () const
float GetRadius () const
float const * GetStart () const
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status ReadAscii (BStreamFileToolkit &tk) alter
 Deprecated.
void SetAxis (float x1, float y1, float z1, float x2, float y2, float z2) alter
void SetAxis (float const *s, float const *e) alter
void SetAxis (float const *a) alter
void SetCaps (int f) alter
void SetRadius (float r) alter
 TK_Cylinder ()
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status WriteAscii (BStreamFileToolkit &tk) alter
 Deprecated.

Protected Attributes

float m_axis [6]
unsigned char m_flags
float m_radius

Detailed Description

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'.


Member Enumeration Documentation

Defines various capping options

Enumerator:
TKCYL_NONE 

no caps

TKCYL_FIRST 

cap 'first' side

TKCYL_SECOND 

cap 'second' side

TKCYL_BOTH 

cap both sides


Constructor & Destructor Documentation

TK_Cylinder::TK_Cylinder ( ) [inline]

constructor


Member Function Documentation

TK_Status TK_Cylinder::Clone ( BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler 
) const [virtual]

Copies the opcode handler

Parameters:
tkA reference to the BStreamFileToolkit object.
handlerA pointer to the opcode handler object. Passed by reference.
Returns:
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

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

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.

Parameters:
tkA reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

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]

Sets the axis of the cylinder using a 2 float triplets

References SetAxis().

Referenced by SetAxis().

void TK_Cylinder::SetAxis ( float const *  a) [inline]

Sets the axis of the cylinder using a float array

References SetAxis().

Referenced by SetAxis().

void TK_Cylinder::SetCaps ( int  f) [inline]

Sets the capping options 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.

Parameters:
tkA reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.


Member Data Documentation

float TK_Cylinder::m_axis[6] [protected]

internal use; Axis endpoints

unsigned char TK_Cylinder::m_flags [protected]

internal use; Caps

float TK_Cylinder::m_radius [protected]

internal use; Radius


The documentation for this class was generated from the following file: