TK_Bounding

Detailed Description

class TK_Bounding : public BBaseOpcodeHandler

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.

Subclassed by HTK_Bounding

Public Functions

inline TK_Bounding(unsigned char opcode)

default constructor

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

constructor variant that accepts min and max values

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

constructor variant that accepts center and radius values

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

constructor variant that accepts min and max double values

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

constructor variant that accepts center and radius double values

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.