TK_Cylinder

class TK_Cylinder

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

Inherits from: BBaseOpcodeHandler

Enumerations

Methods

TK_Cylinder::TK_Cylinder()

constructor

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.
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.
TK_Status TK_Cylinder::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

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.
TK_Status TK_Cylinder::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_Cylinder::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

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

Sets the axis of the cylinder using discrete float values

void TK_Cylinder::SetAxis(float const s[], float const e[])

Sets the axis of the cylinder using a 2 float triplets

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

Sets the axis of the cylinder using a float array

float const *TK_Cylinder::GetAxis() const

const

Returns the axis as the address of a float array

float const *TK_Cylinder::GetStart() const

const

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

float const *TK_Cylinder::GetEnd() const

const

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

void TK_Cylinder::SetRadius(float r)

Sets the radius of the cylinder

float TK_Cylinder::GetRadius() const

const

Returns the radius of the cylinder

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

Sets the axis of the cylinder using discrete double values

void TK_Cylinder::SetDAxis(double const s[], double const e[])

Sets the axis of the cylinder using a 2 double triplets

void TK_Cylinder::SetDAxis(double const a[])

Sets the axis of the cylinder using a double array

double const *TK_Cylinder::GetDAxis() const

const

Returns the axis as the address of a double array

double const *TK_Cylinder::GetDStart() const

const

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

double const *TK_Cylinder::GetDEnd() const

const

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

void TK_Cylinder::SetDRadius(double r)

Sets the radius of the cylinder

double TK_Cylinder::GetDRadius() const

const

Returns the radius of the cylinder

void TK_Cylinder::SetCaps(int f)

Sets the capping options of the cylinder

int TK_Cylinder::GetCaps() const

const

Returns the capping_options of the cylinder

Variables

float TK_Cylinder::m_axis[6]

protected

float

internal use; Axis endpoints

float TK_Cylinder::m_radius

protected

float

internal use; Radius

double TK_Cylinder::m_daxis[6]

protected

double

internal use; Axis endpoints

double TK_Cylinder::m_dradius

protected

double

internal use; Radius

unsigned char TK_Cylinder::m_flags

protected

unsigned char

internal use; Caps