Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Sphere Class Reference

Handles the TKE_Sphere opcode. More...

#include <BOpcodeHandler.h>

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
double const * GetDAxis () const
double const * GetDCenter () const
double const * GetDOrtho () const
double GetDRadius () const
float const * GetOrtho () const
float GetRadius () const
TK_Status Read (BStreamFileToolkit &tk)
TK_Status ReadAscii (BStreamFileToolkit &tk)
 Deprecated.
void Reset ()
void SetAxis (float x, float y, float z)
void SetAxis (float const s[])
void SetCenter (float x, float y, float z)
void SetCenter (float const s[])
void SetDAxis (double x, double y, double z)
void SetDAxis (double const s[])
void SetDCenter (double x, double y, double z)
void SetDCenter (double const s[])
void SetDOrtho (double x, double y, double z)
void SetDOrtho (double const s[])
void SetDRadius (double r)
void SetOrtho (float x, float y, float z)
void SetOrtho (float const s[])
void SetRadius (float r)
 TK_Sphere ()
TK_Status Write (BStreamFileToolkit &tk)
TK_Status WriteAscii (BStreamFileToolkit &tk)
 Deprecated.

Protected Attributes

float m_axis [3]
float m_center [3]
double m_daxis [3]
double m_dcenter [3]
double m_dortho [3]
double m_dradius
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

References BBaseOpcodeHandler::Reset().


Member Function Documentation

TK_Status TK_Sphere::Clone ( BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler 
) const [virtual]

Copies the opcode handler

Parameters:
tkA reference to the BStreamFileToolkit object.
handlerA pointer to the opcode handler object. Passed by reference.
Returns:
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

Reimplemented in HTK_Sphere.

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

double const* TK_Sphere::GetDAxis ( ) const [inline]

Returns the axis as the address of a double array

double const* TK_Sphere::GetDCenter ( ) const [inline]

Returns the center as the address of a float array

double const* TK_Sphere::GetDOrtho ( ) const [inline]

Returns the ortho as the address of a double array

double TK_Sphere::GetDRadius ( ) const [inline]

Returns the radius of the sphere

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:
tkA 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  x,
float  y,
float  z 
) [inline]

Sets the axis of the sphere using discrete float values

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

Sets the axis of the sphere using a float array

References SetAxis().

Referenced by SetAxis().

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

Sets the center 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

References SetCenter().

Referenced by SetCenter().

void TK_Sphere::SetDAxis ( double  x,
double  y,
double  z 
) [inline]

Sets the axis of the sphere using discrete double values

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

Sets the axis of the sphere using a double array

References SetDAxis().

Referenced by SetDAxis().

void TK_Sphere::SetDCenter ( double  x,
double  y,
double  z 
) [inline]

Sets the center of the sphere using discrete double values

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

Sets the center of the sphere using a float array

References SetDCenter().

Referenced by SetDCenter().

void TK_Sphere::SetDOrtho ( double  x,
double  y,
double  z 
) [inline]

Sets the ortho of the sphere using discrete double values

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

Sets the ortho of the sphere using a double array

References SetDOrtho().

Referenced by SetDOrtho().

void TK_Sphere::SetDRadius ( double  r) [inline]

Sets the radius of the sphere

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

Sets the ortho 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

References SetOrtho().

Referenced by SetOrtho().

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:
tkA 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

double TK_Sphere::m_daxis[3] [protected]

internal use; direction vector to the north pole

double TK_Sphere::m_dcenter[3] [protected]

internal use; center

double TK_Sphere::m_dortho[3] [protected]

internal use; direction vector to equator at longitude=0

double TK_Sphere::m_dradius [protected]

internal use; Radius

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: