TK_Grid

class TK_Grid

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.

Inherits from: BBaseOpcodeHandler

Methods

TK_Grid::TK_Grid()

constructor

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

Deprecated.

TK_Status TK_Grid::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Grid::SetOrigin(float x, float y, float z)

Sets the origin point of the grid using discrete float values

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

Sets the origin point of the grid using a float triplet

float const *TK_Grid::GetOrigin() const

const

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

float *TK_Grid::GetOrigin()

Returns the origin point of the grid as the address of a float triplet which may be written

void TK_Grid::SetRef1(float x, float y, float z)

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

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

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

float const *TK_Grid::GetRef1() const

const

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

float *TK_Grid::GetRef1()

Returns the first reference point of the grid as the address of a float triplet which may be written

void TK_Grid::SetRef2(float x, float y, float z)

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

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

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

float const *TK_Grid::GetRef2() const

const

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

float *TK_Grid::GetRef2()

Returns the second reference point of the grid as the address of a float triplet which may be written

void TK_Grid::SetDOrigin(double x, double y, double z)

Sets the origin point of the grid using discrete double values

void TK_Grid::SetDOrigin(double const o[])

Sets the origin point of the grid using a double triplet

double const *TK_Grid::GetDOrigin() const

const

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

double *TK_Grid::GetDOrigin()

Returns the origin point of the grid as the address of a double triplet which may be written

void TK_Grid::SetDRef1(double x, double y, double z)

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

void TK_Grid::SetDRef1(double const r[])

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

double const *TK_Grid::GetDRef1() const

const

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

double *TK_Grid::GetDRef1()

Returns the first reference point of the grid as the address of a double triplet which may be written

void TK_Grid::SetDRef2(double x, double y, double z)

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

void TK_Grid::SetDRef2(double const r[])

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

double const *TK_Grid::GetDRef2() const

const

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

double *TK_Grid::GetDRef2()

Returns the second reference point of the grid as the address of a double triplet which may be written

void TK_Grid::SetCounts(int c1, int c2)

Sets the extent counts of the grid using discrete integers

int const *TK_Grid::GetCounts() const

const

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

int *TK_Grid::GetCounts()

Returns the extent counts of the grid as the address of a pair of integers which may be written

void TK_Grid::SetType(int t)

Sets the type of the grid

int TK_Grid::GetType() const

const

Returns the type of the grid

Variables

char TK_Grid::m_type

protected

char

internal use; Type of grid

float TK_Grid::m_points[9]

protected

float

internal use; Grid origin

double TK_Grid::m_dpoints[9]

protected

double

internal use; Grid origin

int TK_Grid::m_counts[2]

protected

int

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