TK_Grid Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Grid:

Inheritance graph
[legend]
Collaboration diagram for TK_Grid:

Collaboration graph
[legend]
List of all members.

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.

Definition at line 6546 of file BOpcodeHandler.h.

Public Member Functions

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

Protected Attributes

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


Constructor & Destructor Documentation

TK_Grid::TK_Grid  )  [inline]
 

constructor

Definition at line 6560 of file BOpcodeHandler.h.


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.

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

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

Definition at line 6602 of file BOpcodeHandler.h.

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

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

Definition at line 6577 of file BOpcodeHandler.h.

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

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

Definition at line 6586 of file BOpcodeHandler.h.

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

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

Definition at line 6595 of file BOpcodeHandler.h.

int TK_Grid::GetType void   )  const [inline]
 

Returns the type of the grid

Definition at line 6607 of file BOpcodeHandler.h.

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

Definition at line 6598 of file BOpcodeHandler.h.

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

Sets the origin point of the grid using a float triplet

Definition at line 6575 of file BOpcodeHandler.h.

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

Sets the origin point of the grid using discrete float values

Definition at line 6571 of file BOpcodeHandler.h.

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

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

Definition at line 6584 of file BOpcodeHandler.h.

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

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

Definition at line 6580 of file BOpcodeHandler.h.

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

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

Definition at line 6593 of file BOpcodeHandler.h.

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

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

Definition at line 6589 of file BOpcodeHandler.h.

void TK_Grid::SetType int  t  )  [inline]
 

Sets the type of the grid

Definition at line 6605 of file BOpcodeHandler.h.

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

Definition at line 6556 of file BOpcodeHandler.h.

float TK_Grid::m_origin[3] [protected]
 

internal use; Grid origin

Definition at line 6553 of file BOpcodeHandler.h.

float TK_Grid::m_ref1[3] [protected]
 

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

Definition at line 6554 of file BOpcodeHandler.h.

float TK_Grid::m_ref2[3] [protected]
 

internal use; First point 'above' the origin

Definition at line 6555 of file BOpcodeHandler.h.

char TK_Grid::m_type [protected]
 

internal use; Type of grid

Definition at line 6552 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:43 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5