TK_Sphere Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Sphere:

Inheritance graph
[legend]
Collaboration diagram for TK_Sphere:

Collaboration graph
[legend]
List of all members.

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.

Definition at line 6293 of file BOpcodeHandler.h.

Public Types

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

Public Member Functions

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

Protected Attributes

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


Member Enumeration Documentation

enum TK_Sphere::Flags
 

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>

Definition at line 6359 of file BOpcodeHandler.h.


Constructor & Destructor Documentation

TK_Sphere::TK_Sphere  )  [inline]
 

constructor

Definition at line 6306 of file BOpcodeHandler.h.


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 void   )  const [inline]
 

Returns the axis as the address of a float array

Definition at line 6342 of file BOpcodeHandler.h.

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

Returns the center as the address of a float array

Definition at line 6325 of file BOpcodeHandler.h.

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

Returns the ortho as the address of a float array

Definition at line 6354 of file BOpcodeHandler.h.

float TK_Sphere::GetRadius void   )  const [inline]
 

Returns the radius of the sphere

Definition at line 6331 of file BOpcodeHandler.h.

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 void   )  [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

Definition at line 6340 of file BOpcodeHandler.h.

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

Sets the axis of the sphere using discrete float values

Definition at line 6334 of file BOpcodeHandler.h.

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

Sets the center of the sphere using a float array

Definition at line 6323 of file BOpcodeHandler.h.

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

Sets the center of the sphere using discrete float values

Definition at line 6319 of file BOpcodeHandler.h.

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

Sets the ortho of the sphere using a float array

Definition at line 6352 of file BOpcodeHandler.h.

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

Sets the ortho of the sphere using discrete float values

Definition at line 6346 of file BOpcodeHandler.h.

void TK_Sphere::SetRadius float  r  )  [inline]
 

Sets the radius of the sphere

Definition at line 6329 of file BOpcodeHandler.h.

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

Definition at line 6301 of file BOpcodeHandler.h.

float TK_Sphere::m_center[3] [protected]
 

internal use; center

Definition at line 6299 of file BOpcodeHandler.h.

unsigned char TK_Sphere::m_flags [protected]
 

internal use; suboptions

Definition at line 6298 of file BOpcodeHandler.h.

float TK_Sphere::m_ortho[3] [protected]
 

internal use; direction vector to equator at longitude=0

Definition at line 6302 of file BOpcodeHandler.h.

float TK_Sphere::m_radius [protected]
 

internal use; Radius

Definition at line 6300 of file BOpcodeHandler.h.


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