TK_Bounding

class TK_Bounding

Handles the TKE_Bounding and TKE_Bounding_Info opcodes.

TK_Bounding provides support for writing/reading the TKE_Bounding and TKE_Bounding_Info opcode objects to/from an HSF file.

The HOOPS/3dGS scene-graph maintain bounding volume information which denotes the extents of the scene. Exporting bounding information (typically at the beginning of the HSF file) is useful so that a reading app can quickly find out the scene-extents and set an appropriate camera. Handles the TKE_Bounding, and TKE_Bounding_Info opcodes.

TK_Bounding provides support for writing/reading the TKE_Bounding TKE_Bounding_Info opcode objects to/from an HSF file.

The HOOPS/3dGS scene-graph supports ‘marker’ primitives which consist of a 3D point, as well as distant and local lights which are also denoted by a single 3D point.

Two different opcodes are used as follows: The TKE_Bounding opcode will export a bounding volume that was explicitly set on a HOOPS segment (if any). The TKE_Bounding_Info will cause an explicit computation of the HOOPS/3dGS bounding information and export it.

Inherits from: BBaseOpcodeHandler

Methods

TK_Bounding::TK_Bounding(unsigned char opcode)

default constructor

TK_Bounding::TK_Bounding(unsigned char opcode, float const min[], float const max[])

constructor variant that accepts min and max values

TK_Bounding::TK_Bounding(unsigned char opcode, float const center[], float radius)

constructor variant that accepts center and radius values

TK_Bounding::TK_Bounding(unsigned char opcode, double const min[], double const max[])

constructor variant that accepts min and max double values

TK_Bounding::TK_Bounding(unsigned char opcode, double const center[], double const radius)

constructor variant that accepts center and radius double values

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

Deprecated.

TK_Status TK_Bounding::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

Variables

double TK_Bounding::m_dvalues[6]

protected

double

internal use

float TK_Bounding::m_values[6]

protected

float

internal use

char TK_Bounding::m_type

protected

char

internal use

bool TK_Bounding::m_is_valid

protected

bool

internal use