TK_Sphere

Types

Flags

Fields

TKSPH_NONE
TKSPH_NULL_AXIS

Functions

TK_Sphere
TK_Status Read
TK_Status Write
TK_Status Clone
TK_Status ReadAscii
TK_Status WriteAscii
void Reset
void SetCenter
void SetCenter
float const * GetCenter
void SetRadius
float GetRadius
void SetAxis
void SetAxis
float const * GetAxis
void SetOrtho
void SetOrtho
float const * GetOrtho
void SetDCenter
void SetDCenter
double const * GetDCenter
void SetDRadius
double GetDRadius
void SetDAxis
void SetDAxis
double const * GetDAxis
void SetDOrtho
void SetDOrtho
double const * GetDOrtho

Detailed Description

class TK_Sphere : public BBaseOpcodeHandler

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.

Public Types

enum Flags

Defines various capping options

Values:

enumerator TKSPH_NONE

no special handling

enumerator TKSPH_NULL_AXIS

omit axis and ortho, in favor of default values of <0,1,0>,<1,0,0>

Public Functions

inline TK_Sphere()

constructor

virtual TK_Status Read(BStreamFileToolkit &tk)

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.
virtual TK_Status Write(BStreamFileToolkit &tk)

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.
virtual TK_Status Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

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 ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status WriteAscii(BStreamFileToolkit &tk)

Deprecated.

virtual void Reset()

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.

inline void SetCenter(float x, float y, float z)

Sets the center of the sphere using discrete float values

inline void SetCenter(float const s[])

Sets the center of the sphere using a float array

inline float const *GetCenter() const

Returns the center as the address of a float array

inline void SetRadius(float r)

Sets the radius of the sphere

inline float GetRadius() const

Returns the radius of the sphere

inline void SetAxis(float x, float y, float z)

Sets the axis of the sphere using discrete float values

inline void SetAxis(float const s[])

Sets the axis of the sphere using a float array

inline float const *GetAxis() const

Returns the axis as the address of a float array

inline void SetOrtho(float x, float y, float z)

Sets the ortho of the sphere using discrete float values

inline void SetOrtho(float const s[])

Sets the ortho of the sphere using a float array

inline float const *GetOrtho() const

Returns the ortho as the address of a float array

inline void SetDCenter(double x, double y, double z)

Sets the center of the sphere using discrete double values

inline void SetDCenter(double const s[])

Sets the center of the sphere using a float array

inline double const *GetDCenter() const

Returns the center as the address of a float array

inline void SetDRadius(double r)

Sets the radius of the sphere

inline double GetDRadius() const

Returns the radius of the sphere

inline void SetDAxis(double x, double y, double z)

Sets the axis of the sphere using discrete double values

inline void SetDAxis(double const s[])

Sets the axis of the sphere using a double array

inline double const *GetDAxis() const

Returns the axis as the address of a double array

inline void SetDOrtho(double x, double y, double z)

Sets the ortho of the sphere using discrete double values

inline void SetDOrtho(double const s[])

Sets the ortho of the sphere using a double array

inline double const *GetDOrtho() const

Returns the ortho as the address of a double array