Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

TK_PolyCylinder Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_PolyCylinder:

Inheritance graph
[legend]
Collaboration diagram for TK_PolyCylinder:

Collaboration graph
[legend]
List of all members.

Detailed Description

Handles the TKE_PolyCylinder opcode.

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

Definition at line 4200 of file BOpcodeHandler.h.

Public Types

enum  Capping_Options

Public Member Functions

 TK_PolyCylinder ()
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
void Reset (void) alter
void SetPoints (int count, float const *points=0) alter
float const * GetPoints (void) const
float alter * GetPoints (void) alter
int GetCount (void) const
void SetRadii (int count, float const *radii=0) alter
void SetRadius (float radius) alter
float const * GetRadii (void) const
float alter * GetRadii (void) alter
int GetRadiusCount (void) const
void SetCaps (int f) alter
int GetCaps (void) const
void SetEndNormal (int index, float const *normal=0) alter
float const * GetEndNormal (int index) const

Protected Attributes

int m_count
float * m_points
int m_radius_count
float * m_radii
unsigned char m_flags
float m_normals [6]


Member Enumeration Documentation

enum TK_PolyCylinder::Capping_Options
 

Cylinder capping options

Definition at line 4226 of file BOpcodeHandler.h.


Constructor & Destructor Documentation

TK_PolyCylinder::TK_PolyCylinder  )  [inline]
 

constructor

Definition at line 4215 of file BOpcodeHandler.h.


Member Function Documentation

int TK_PolyCylinder::GetCaps void   )  const [inline]
 

Returns the capping options of the cylinder

Definition at line 4263 of file BOpcodeHandler.h.

int TK_PolyCylinder::GetCount void   )  const [inline]
 

Returns the number of points in the buffer

Definition at line 4242 of file BOpcodeHandler.h.

float const* TK_PolyCylinder::GetEndNormal int  index  )  const [inline]
 

Returns the normal associated with an end of the polycylinder (0 if none)

Definition at line 4278 of file BOpcodeHandler.h.

float alter* TK_PolyCylinder::GetPoints void   )  [inline]
 

Returns the address of the point buffer, which may be modified directly

Reimplemented from TK_Polyhedron.

Definition at line 4240 of file BOpcodeHandler.h.

float const* TK_PolyCylinder::GetPoints void   )  const [inline]
 

Returns the address of the point buffer

Reimplemented from TK_Polyhedron.

Definition at line 4238 of file BOpcodeHandler.h.

float alter* TK_PolyCylinder::GetRadii void   )  [inline]
 

Returns the address of the point buffer, which may be modified directly

Definition at line 4255 of file BOpcodeHandler.h.

float const* TK_PolyCylinder::GetRadii void   )  const [inline]
 

Returns the address of the point buffer

Definition at line 4253 of file BOpcodeHandler.h.

int TK_PolyCylinder::GetRadiusCount void   )  const [inline]
 

Returns the number of points in the buffer

Definition at line 4257 of file BOpcodeHandler.h.

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

Implements BBaseOpcodeHandler.

void TK_PolyCylinder::Reset void   )  [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.

Reimplemented from BBaseOpcodeHandler.

void TK_PolyCylinder::SetCaps int  f  )  [inline]
 

Sets the capping options of the cylinder

Definition at line 4261 of file BOpcodeHandler.h.

void TK_PolyCylinder::SetEndNormal int  index,
float const *  normal = 0
[inline]
 

Sets (or clears) the normal associated with an end of the polycylinder

Definition at line 4266 of file BOpcodeHandler.h.

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

Reimplemented from TK_Polyhedron.

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  )  [inline]
 

Convenience function to set a single radius

Definition at line 4251 of file BOpcodeHandler.h.

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

Implements BBaseOpcodeHandler.


Member Data Documentation

int TK_PolyCylinder::m_count [protected]
 

internal use; Number of 3D points that define this polycylinder object

Definition at line 4206 of file BOpcodeHandler.h.

unsigned char TK_PolyCylinder::m_flags [protected]
 

internal use; Caps, normals, colors

Definition at line 4210 of file BOpcodeHandler.h.

float TK_PolyCylinder::m_normals[6] [protected]
 

internal use; Normals of end caps

Definition at line 4211 of file BOpcodeHandler.h.

float* TK_PolyCylinder::m_points [protected]
 

internal use; Array of floats which denote the point coordinates.

Definition at line 4207 of file BOpcodeHandler.h.

float* TK_PolyCylinder::m_radii [protected]
 

internal use; Array of floats which denote the radii.

Definition at line 4209 of file BOpcodeHandler.h.

int TK_PolyCylinder::m_radius_count [protected]
 

internal use; Number of radii associated with the points

Definition at line 4208 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:06:12 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1