TK_Cylinder

Types

Capping_Options

Fields

TKCYL_NONE

TKCYL_FIRST

TKCYL_SECOND

TKCYL_BOTH

Functions

TK_Cylinder

TK_Status

Read

TK_Status

Write

TK_Status

Clone

TK_Status

ReadAscii

TK_Status

WriteAscii

void

SetAxis

void

SetAxis

void

SetAxis

float const *

GetAxis

float const *

GetStart

float const *

GetEnd

void

SetRadius

float

GetRadius

void

SetDAxis

void

SetDAxis

void

SetDAxis

double const *

GetDAxis

double const *

GetDStart

double const *

GetDEnd

void

SetDRadius

double

GetDRadius

void

SetCaps

int

GetCaps

Detailed Description

class TK_Cylinder : public BBaseOpcodeHandler

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

Subclassed by HTK_Cylinder

Public Types

enum Capping_Options

Defines various capping options

Values:

enumerator TKCYL_NONE

no caps

enumerator TKCYL_FIRST

cap ‘first’ side

enumerator TKCYL_SECOND

cap ‘second’ side

enumerator TKCYL_BOTH

cap both sides

Public Functions

inline TK_Cylinder()

constructor

virtual TK_Status Read(BStreamFileToolkit &tk)

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.

virtual TK_Status Write(BStreamFileToolkit &tk)

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.

virtual TK_Status Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

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.

TK_Status ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status WriteAscii(BStreamFileToolkit &tk)

Deprecated.

inline void SetAxis(float x1, float y1, float z1, float x2, float y2, float z2)

Sets the axis of the cylinder using discrete float values

inline void SetAxis(float const s[], float const e[])

Sets the axis of the cylinder using a 2 float triplets

inline void SetAxis(float const a[])

Sets the axis of the cylinder using a float array

inline float const *GetAxis() const

Returns the axis as the address of a float array

inline float const *GetStart() const

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

inline float const *GetEnd() const

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

inline void SetRadius(float r)

Sets the radius of the cylinder

inline float GetRadius() const

Returns the radius of the cylinder

inline void SetDAxis(double x1, double y1, double z1, double x2, double y2, double z2)

Sets the axis of the cylinder using discrete double values

inline void SetDAxis(double const s[], double const e[])

Sets the axis of the cylinder using a 2 double triplets

inline void SetDAxis(double const a[])

Sets the axis of the cylinder using a double array

inline double const *GetDAxis() const

Returns the axis as the address of a double array

inline double const *GetDStart() const

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

inline double const *GetDEnd() const

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

inline void SetDRadius(double r)

Sets the radius of the cylinder

inline double GetDRadius() const

Returns the radius of the cylinder

inline void SetCaps(int f)

Sets the capping options of the cylinder

inline int GetCaps() const

Returns the capping_options of the cylinder