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

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

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.

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::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]

Sets the axis of the cylinder using a double array

References SetDAxis().

Referenced by SetDAxis().

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.

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

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


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