Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

TK_Camera Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Camera:

Inheritance graph
[legend]
Collaboration diagram for TK_Camera:

Collaboration graph
[legend]
List of all members.

Detailed Description

Handles the TKE_Camera opcode.

TK_Camera provides support for writing/reading the TKE_Camera opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph supports a camera, which is a segment attribute defining a specific view of world space.

Definition at line 3136 of file BOpcodeHandler.h.

Public Member Functions

 TK_Camera (unsigned char opcode=TKE_Camera)
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
void SetPosition (float x, float y, float z) alter
void SetPosition (float const *p) alter
float const * GetPosition (void) const
void SetTarget (float x, float y, float z) alter
void SetTarget (float const *t) alter
float const * GetTarget (void) const
void SetUpVector (float x, float y, float z) alter
void SetUpVector (float const *u) alter
float const * GetUpVector (void) const
void SetField (float w, float h) alter
void SetField (float const *f) alter
float const * GetField (void) const
void SetOblique (float h, float v) alter
void SetOblique (float const *o) alter
float const * GetOblique (void) const
void SetProjection (int p) alter
int GetProjection (void) const
void SetView (char const *name) alter
void SetView (int length) alter
char const * GetView (void) const
char alter * GetView (void) alter

Protected Member Functions

void set_name (char const *name) alter
 internal use
void set_name (int length) alter
 internal use

Protected Attributes

float m_settings [13]
char m_projection
 internal use
int m_length
char * m_name


Constructor & Destructor Documentation

TK_Camera::TK_Camera unsigned char  opcode = TKE_Camera  )  [inline]
 

constructor

Definition at line 3157 of file BOpcodeHandler.h.


Member Function Documentation

float const* TK_Camera::GetField void   )  const [inline]
 

Returns the camera field size as the address of a float pair

Definition at line 3198 of file BOpcodeHandler.h.

float const* TK_Camera::GetOblique void   )  const [inline]
 

Returns the camera oblique angles as the address of a float pair

Definition at line 3205 of file BOpcodeHandler.h.

float const* TK_Camera::GetPosition void   )  const [inline]
 

Returns the position of the camera as the adress of a float triplet

Definition at line 3175 of file BOpcodeHandler.h.

int TK_Camera::GetProjection void   )  const [inline]
 

Returns the projection type. Projection types are specified by TKO_Camera_Projection.

Definition at line 3210 of file BOpcodeHandler.h.

float const* TK_Camera::GetTarget void   )  const [inline]
 

Returns the target of the camera as the adress of a float triplet

Definition at line 3183 of file BOpcodeHandler.h.

float const* TK_Camera::GetUpVector void   )  const [inline]
 

Returns the up-vector of the camera as the adress of a float triplet

Definition at line 3191 of file BOpcodeHandler.h.

char alter* TK_Camera::GetView void   )  [inline]
 

Returns the view name buffer, which may be modified directly

Definition at line 3219 of file BOpcodeHandler.h.

char const* TK_Camera::GetView void   )  const [inline]
 

Returns the view name.

Definition at line 3217 of file BOpcodeHandler.h.

TK_Status TK_Camera::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_Camera::SetField float const *  f  )  [inline]
 

Sets the camera field size using a float pair

Definition at line 3196 of file BOpcodeHandler.h.

void TK_Camera::SetField float  w,
float  h
[inline]
 

Sets the camera field size using discrete float values

Definition at line 3194 of file BOpcodeHandler.h.

void TK_Camera::SetOblique float const *  o  )  [inline]
 

Sets the camera oblique angles (degrees) using a float pair

Definition at line 3203 of file BOpcodeHandler.h.

void TK_Camera::SetOblique float  h,
float  v
[inline]
 

Sets the camera oblique angles (degrees) using discrete float values

Definition at line 3201 of file BOpcodeHandler.h.

void TK_Camera::SetPosition float const *  p  )  [inline]
 

Sets the position of the camera using a float triplet

Definition at line 3173 of file BOpcodeHandler.h.

void TK_Camera::SetPosition float  x,
float  y,
float  z
[inline]
 

Sets the position of the camera using discrete float values

Definition at line 3170 of file BOpcodeHandler.h.

void TK_Camera::SetProjection int  p  )  [inline]
 

Sets the projection type. Projection types are specified by TKO_Camera_Projection.

Definition at line 3208 of file BOpcodeHandler.h.

void TK_Camera::SetTarget float const *  t  )  [inline]
 

Sets the target of the camera using a float triplet

Definition at line 3181 of file BOpcodeHandler.h.

void TK_Camera::SetTarget float  x,
float  y,
float  z
[inline]
 

Sets the target of the camera using discrete float values

Definition at line 3178 of file BOpcodeHandler.h.

void TK_Camera::SetUpVector float const *  u  )  [inline]
 

Sets the up-vector of the camera using a float triplet

Definition at line 3189 of file BOpcodeHandler.h.

void TK_Camera::SetUpVector float  x,
float  y,
float  z
[inline]
 

Sets the up-vector of the camera using discrete float values

Definition at line 3186 of file BOpcodeHandler.h.

void TK_Camera::SetView int  length  )  [inline]
 

Sets the view name buffer. Allocates a buffer which can hold a srting of 'length' characters

Definition at line 3215 of file BOpcodeHandler.h.

void TK_Camera::SetView char const *  name  )  [inline]
 

Sets the view name. Allocates the buffer and copies the string

Definition at line 3213 of file BOpcodeHandler.h.

TK_Status TK_Camera::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

int TK_Camera::m_length [protected]
 

Length of view name

Definition at line 3147 of file BOpcodeHandler.h.

char* TK_Camera::m_name [protected]
 

View name

Definition at line 3148 of file BOpcodeHandler.h.

float TK_Camera::m_settings[13] [protected]
 

internal use; stored in the following order: position(3), target(3), up(3), width, height, oblique(2) Position, target, and up are all object space. Width and height define the span of the minimum area around the target to be visible

Definition at line 3145 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:06:04 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1