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 4977 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
TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
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 SetNearLimit (float l) alter
float GetNearLimit (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 [14]
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 4998 of file BOpcodeHandler.h.


Member Function Documentation

TK_Status TK_Camera::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_Camera::GetField void   )  const [inline]
 

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

Definition at line 5043 of file BOpcodeHandler.h.

float TK_Camera::GetNearLimit void   )  const [inline]
 

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

Definition at line 5067 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 5054 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 5020 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 5059 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 5028 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 5036 of file BOpcodeHandler.h.

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

Returns the view name buffer, which may be modified directly

Definition at line 5076 of file BOpcodeHandler.h.

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

Returns the view name.

Definition at line 5074 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 5041 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 5039 of file BOpcodeHandler.h.

void TK_Camera::SetNearLimit float  l  )  [inline]
 

Sets the camera field size using discrete float values

Definition at line 5062 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 5052 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 5046 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 5018 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 5015 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 5057 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 5026 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 5023 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 5034 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 5031 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 5072 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 5070 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 4988 of file BOpcodeHandler.h.

char* TK_Camera::m_name [protected]
 

View name

Definition at line 4989 of file BOpcodeHandler.h.

float TK_Camera::m_settings[14] [protected]
 

internal use; stored in the following order: position(3), target(3), up(3), width, height, oblique(2), near_limnit 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 4986 of file BOpcodeHandler.h.


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