TK_Sphere

class TK_Sphere

Handles the TKE_Sphere opcode.

TK_Sphere provides support for writing/reading the TKE_Sphere opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph can contain ‘sphere’ primitives which are defined by the center point the radius, two vectors to dictate where tessellation should begin.

Inherits from: BBaseOpcodeHandler

Enumerations

Methods

TK_Sphere::TK_Sphere()

constructor

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

Deprecated.

TK_Status TK_Sphere::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Sphere::Reset()

virtual

Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

void TK_Sphere::SetCenter(float x, float y, float z)

Sets the center of the sphere using discrete float values

void TK_Sphere::SetCenter(float const s[])

Sets the center of the sphere using a float array

float const *TK_Sphere::GetCenter() const

const

Returns the center as the address of a float array

void TK_Sphere::SetRadius(float r)

Sets the radius of the sphere

float TK_Sphere::GetRadius() const

const

Returns the radius of the sphere

void TK_Sphere::SetAxis(float x, float y, float z)

Sets the axis of the sphere using discrete float values

void TK_Sphere::SetAxis(float const s[])

Sets the axis of the sphere using a float array

float const *TK_Sphere::GetAxis() const

const

Returns the axis as the address of a float array

void TK_Sphere::SetOrtho(float x, float y, float z)

Sets the ortho of the sphere using discrete float values

void TK_Sphere::SetOrtho(float const s[])

Sets the ortho of the sphere using a float array

float const *TK_Sphere::GetOrtho() const

const

Returns the ortho as the address of a float array

void TK_Sphere::SetDCenter(double x, double y, double z)

Sets the center of the sphere using discrete double values

void TK_Sphere::SetDCenter(double const s[])

Sets the center of the sphere using a float array

double const *TK_Sphere::GetDCenter() const

const

Returns the center as the address of a float array

void TK_Sphere::SetDRadius(double r)

Sets the radius of the sphere

double TK_Sphere::GetDRadius() const

const

Returns the radius of the sphere

void TK_Sphere::SetDAxis(double x, double y, double z)

Sets the axis of the sphere using discrete double values

void TK_Sphere::SetDAxis(double const s[])

Sets the axis of the sphere using a double array

double const *TK_Sphere::GetDAxis() const

const

Returns the axis as the address of a double array

void TK_Sphere::SetDOrtho(double x, double y, double z)

Sets the ortho of the sphere using discrete double values

void TK_Sphere::SetDOrtho(double const s[])

Sets the ortho of the sphere using a double array

double const *TK_Sphere::GetDOrtho() const

const

Returns the ortho as the address of a double array

Variables

unsigned char TK_Sphere::m_flags

protected

unsigned char

internal use; suboptions

float TK_Sphere::m_center[3]

protected

float

internal use; center

float TK_Sphere::m_radius

protected

float

internal use; Radius

float TK_Sphere::m_axis[3]

protected

float

internal use; direction vector to the north pole

float TK_Sphere::m_ortho[3]

protected

float

internal use; direction vector to equator at longitude=0

double TK_Sphere::m_dcenter[3]

protected

double

internal use; center

double TK_Sphere::m_dradius

protected

double

internal use; Radius

double TK_Sphere::m_daxis[3]

protected

double

internal use; direction vector to the north pole

double TK_Sphere::m_dortho[3]

protected

double

internal use; direction vector to equator at longitude=0