Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Sphere Class Reference

Handles the TKE_Sphere opcode. More...

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Sphere:

BBaseOpcodeHandler BControlledMemoryObject

List of all members.

Public Types

enum  Flags { TKSPH_NONE = 0x0, TKSPH_NULL_AXIS = 0x1 }

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
float const * GetAxis () const
float const * GetCenter () const
float const * GetOrtho () const
float GetRadius () const
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status ReadAscii (BStreamFileToolkit &tk) alter
 Deprecated.
void Reset () alter
void SetAxis (float const *s) alter
void SetAxis (float x, float y, float z) alter
void SetCenter (float const *s) alter
void SetCenter (float x, float y, float z) alter
void SetOrtho (float const *s) alter
void SetOrtho (float x, float y, float z) alter
void SetRadius (float r) alter
 TK_Sphere ()
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status WriteAscii (BStreamFileToolkit &tk) alter
 Deprecated.

Protected Attributes

float m_axis [3]
float m_center [3]
unsigned char m_flags
float m_ortho [3]
float m_radius


Detailed Description

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.


Member Enumeration Documentation

Defines various capping options

Enumerator:
TKSPH_NONE  no special handling
TKSPH_NULL_AXIS  omit axis and ortho, in favor of default values of <0,1,0>,<1,0,0>


Constructor & Destructor Documentation

TK_Sphere::TK_Sphere (  )  [inline]

constructor


Member Function Documentation

TK_Status TK_Sphere::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.

float const* TK_Sphere::GetAxis (  )  const [inline]

Returns the axis as the address of a float array

float const* TK_Sphere::GetCenter (  )  const [inline]

Returns the center as the address of a float array

float const* TK_Sphere::GetOrtho (  )  const [inline]

Returns the ortho as the address of a float array

float TK_Sphere::GetRadius (  )  const [inline]

Returns the radius of the sphere

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.

Implements BBaseOpcodeHandler.

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.

Reimplemented from BBaseOpcodeHandler.

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

Sets the axis of the sphere using a float array

void TK_Sphere::SetAxis ( float  x,
float  y,
float  z 
) [inline]

Sets the axis of the sphere using discrete float values

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

Sets the center of the sphere using a float array

void TK_Sphere::SetCenter ( float  x,
float  y,
float  z 
) [inline]

Sets the center of the sphere using discrete float values

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

Sets the ortho of the sphere using a float array

void TK_Sphere::SetOrtho ( float  x,
float  y,
float  z 
) [inline]

Sets the ortho of the sphere using discrete float values

void TK_Sphere::SetRadius ( float  r  )  [inline]

Sets the radius of the sphere

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.

Implements BBaseOpcodeHandler.


Member Data Documentation

float TK_Sphere::m_axis[3] [protected]

internal use; direction vector to the north pole

float TK_Sphere::m_center[3] [protected]

internal use; center

unsigned char TK_Sphere::m_flags [protected]

internal use; suboptions

float TK_Sphere::m_ortho[3] [protected]

internal use; direction vector to equator at longitude=0

float TK_Sphere::m_radius [protected]

internal use; Radius


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