Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Grid Class Reference

Handles the TKE_Grid opcode. More...

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Grid:

BBaseOpcodeHandler BControlledMemoryObject HTK_Grid

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
int const * GetCounts () const
float const * GetOrigin () const
float const * GetRef1 () const
float const * GetRef2 () const
int GetType () const
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status ReadAscii (BStreamFileToolkit &tk) alter
 Deprecated.
void SetCounts (int c1, int c2) alter
void SetOrigin (float const *o) alter
void SetOrigin (float x, float y, float z) alter
void SetRef1 (float const *r) alter
void SetRef1 (float x, float y, float z) alter
void SetRef2 (float const *r) alter
void SetRef2 (float x, float y, float z) alter
void SetType (int t)
 TK_Grid ()
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status WriteAscii (BStreamFileToolkit &tk) alter
 Deprecated.

Protected Attributes

int m_counts [2]
float m_origin [3]
float m_ref1 [3]
float m_ref2 [3]
char m_type


Detailed Description

Handles the TKE_Grid opcode.

TK_Grid provides support for writing/reading the TKE_Grid opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph supports 'grid' primitives which are defined by a grid type, origin, and points which define grid spacing.


Constructor & Destructor Documentation

TK_Grid::TK_Grid (  )  [inline]

constructor


Member Function Documentation

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

Reimplemented from BBaseOpcodeHandler.

Reimplemented in HTK_Grid.

int const* TK_Grid::GetCounts (  )  const [inline]

Returns the extent counts of the grid as the address of a pair of integers

float const* TK_Grid::GetOrigin (  )  const [inline]

Returns the origin point of the grid as the address of a float triplet

float const* TK_Grid::GetRef1 (  )  const [inline]

Returns the first reference point of the grid as the address of a float triplet

float const* TK_Grid::GetRef2 (  )  const [inline]

Returns the second reference point of the grid as the address of a float triplet

int TK_Grid::GetType (  )  const [inline]

Returns the type of the grid

TK_Status TK_Grid::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_Grid::SetCounts ( int  c1,
int  c2 
) [inline]

Sets the extent counts of the grid using discrete integers

void TK_Grid::SetOrigin ( float const *  o  )  [inline]

Sets the origin point of the grid using a float triplet

void TK_Grid::SetOrigin ( float  x,
float  y,
float  z 
) [inline]

Sets the origin point of the grid using discrete float values

void TK_Grid::SetRef1 ( float const *  r  )  [inline]

Sets the first reference point of the grid using a float triplet

void TK_Grid::SetRef1 ( float  x,
float  y,
float  z 
) [inline]

Sets the first reference point of the grid using discrete float values

void TK_Grid::SetRef2 ( float const *  r  )  [inline]

Sets the second reference point of the grid using a float triplet

void TK_Grid::SetRef2 ( float  x,
float  y,
float  z 
) [inline]

Sets the second reference point of the grid using discrete float values

void TK_Grid::SetType ( int  t  )  [inline]

Sets the type of the grid

TK_Status TK_Grid::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_Grid::m_counts[2] [protected]

internal use; Number of units along the ref1 and ref2 dimensions

float TK_Grid::m_origin[3] [protected]

internal use; Grid origin

float TK_Grid::m_ref1[3] [protected]

internal use; First point to the 'right' of the origin

float TK_Grid::m_ref2[3] [protected]

internal use; First point 'above' the origin

char TK_Grid::m_type [protected]

internal use; Type of grid


The documentation for this class was generated from the following file: