TK_Cylinder Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Cylinder:

Inheritance graph
[legend]
Collaboration diagram for TK_Cylinder:

Collaboration graph
[legend]
List of all members.

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

Definition at line 6375 of file BOpcodeHandler.h.

Public Types

enum  Capping_Options { TKCYL_NONE = 0, TKCYL_FIRST = 1, TKCYL_SECOND = 2, TKCYL_BOTH = 3 }

Public Member Functions

 TK_Cylinder ()
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
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
float const * GetAxis (void) const
float const * GetStart (void) const
float const * GetEnd (void) const
void SetRadius (float r) alter
float GetRadius (void) const
void SetCaps (int f) alter
int GetCaps (void) const

Protected Attributes

float m_axis [6]
float m_radius
unsigned char m_flags


Member Enumeration Documentation

enum TK_Cylinder::Capping_Options
 

Defines various capping options

Enumerator:
TKCYL_NONE  no caps
TKCYL_FIRST  cap 'first' side
TKCYL_SECOND  cap 'second' side
TKCYL_BOTH  cap both sides

Definition at line 6426 of file BOpcodeHandler.h.


Constructor & Destructor Documentation

TK_Cylinder::TK_Cylinder  )  [inline]
 

constructor

Definition at line 6387 of file BOpcodeHandler.h.


Member Function Documentation

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

Copies the opcode handler

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

Reimplemented from BBaseOpcodeHandler.

float const* TK_Cylinder::GetAxis void   )  const [inline]
 

Returns the axis as the address of a float array

Definition at line 6407 of file BOpcodeHandler.h.

int TK_Cylinder::GetCaps void   )  const [inline]
 

Returns the capping_options of the cylinder

Definition at line 6421 of file BOpcodeHandler.h.

float const* TK_Cylinder::GetEnd void   )  const [inline]
 

Returns the axis end point as the address of a float array

Definition at line 6411 of file BOpcodeHandler.h.

float TK_Cylinder::GetRadius void   )  const [inline]
 

Returns the radius of the cylinder

Definition at line 6416 of file BOpcodeHandler.h.

float const* TK_Cylinder::GetStart void   )  const [inline]
 

Returns the axis start point as the address of a float array

Definition at line 6409 of file BOpcodeHandler.h.

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:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.

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

Sets the axis of the cylinder using a float array

Definition at line 6405 of file BOpcodeHandler.h.

void TK_Cylinder::SetAxis float const *  s,
float const *  e
[inline]
 

Sets the axis of the cylinder using a 2 float triplets

Definition at line 6403 of file BOpcodeHandler.h.

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

Definition at line 6398 of file BOpcodeHandler.h.

void TK_Cylinder::SetCaps int  f  )  [inline]
 

Sets the capping options of the cylinder

Definition at line 6419 of file BOpcodeHandler.h.

void TK_Cylinder::SetRadius float  r  )  [inline]
 

Sets the radius of the cylinder

Definition at line 6414 of file BOpcodeHandler.h.

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:
tk A 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

Definition at line 6381 of file BOpcodeHandler.h.

unsigned char TK_Cylinder::m_flags [protected]
 

internal use; Caps

Definition at line 6383 of file BOpcodeHandler.h.

float TK_Cylinder::m_radius [protected]
 

internal use; Radius

Definition at line 6382 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:42 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5