#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
void | GetDField (double *f) const |
double const * | GetDField () const |
void | GetDPosition (double *p) const |
double const * | GetDPosition () const |
void | GetDTarget (double *t) const |
double const * | GetDTarget () const |
void | GetDUpVector (double *u) const |
double const * | GetDUpVector () const |
void | GetField (float *f) const |
float const * | GetField () const |
float | GetNearLimit () const |
void | GetOblique (float *o) const |
float const * | GetOblique () const |
void | GetPosition (float *p) const |
float const * | GetPosition () const |
int | GetProjection () const |
void | GetTarget (float *t) const |
float const * | GetTarget () const |
void | GetUpVector (float *u) const |
float const * | GetUpVector () const |
char * | GetView () |
char const * | GetView () const |
TK_Status | Read (BStreamFileToolkit &tk) |
TK_Status | ReadAscii (BStreamFileToolkit &tk) |
Deprecated. | |
void | SetDField (double const *f) |
void | SetDField (double w, double h) |
void | SetDPosition (double const *p) |
void | SetDPosition (double x, double y, double z) |
void | SetDTarget (double const *t) |
void | SetDTarget (double x, double y, double z) |
void | SetDUpVector (double const *u) |
void | SetDUpVector (double x, double y, double z) |
void | SetField (float const *f) |
void | SetField (float w, float h) |
void | SetNearLimit (float l) |
void | SetOblique (float const *o) |
void | SetOblique (float h, float v) |
void | SetPosition (float const *p) |
void | SetPosition (float x, float y, float z) |
void | SetProjection (int p) |
void | SetTarget (float const *t) |
void | SetTarget (float x, float y, float z) |
void | SetUpVector (float const *u) |
void | SetUpVector (float x, float y, float z) |
void | SetView (int length) |
void | SetView (char const *name) |
TK_Camera (unsigned char opcode=TKE_Camera) | |
TK_Status | Write (BStreamFileToolkit &tk) |
TK_Status | WriteAscii (BStreamFileToolkit &tk) |
Deprecated. | |
Protected Member Functions | |
void | set_name (int length) |
internal use | |
void | set_name (char const *name) |
internal use | |
Protected Attributes | |
float | m_details [3] |
double | m_dsettings [14] |
int | m_length |
char * | m_name |
unsigned char | m_projection |
internal use | |
float | m_settings [14] |
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.
TK_Camera::TK_Camera | ( | unsigned char | opcode = TKE_Camera |
) | [inline] |
constructor
TK_Status TK_Camera::Clone | ( | BStreamFileToolkit & | tk, | |
BBaseOpcodeHandler ** | handler | |||
) | const [virtual] |
Copies the opcode handler
tk | A reference to the BStreamFileToolkit object. | |
handler | A pointer to the opcode handler object. Passed by reference. |
Reimplemented from BBaseOpcodeHandler.
Reimplemented in HTK_Camera.
void TK_Camera::GetDField | ( | double * | f | ) | const [inline] |
Returns the camera field size to a pre-allocated array
double const* TK_Camera::GetDField | ( | ) | const [inline] |
Returns the camera field size as the address of a float pair
void TK_Camera::GetDPosition | ( | double * | p | ) | const [inline] |
Returns the position of the camera to a pre-allocated array
double const* TK_Camera::GetDPosition | ( | ) | const [inline] |
Returns the position of the camera as the address of a double triplet
void TK_Camera::GetDTarget | ( | double * | t | ) | const [inline] |
Returns the target of the camera to a pre-allocated array
double const* TK_Camera::GetDTarget | ( | ) | const [inline] |
Returns the target of the camera as the address of a float triplet
void TK_Camera::GetDUpVector | ( | double * | u | ) | const [inline] |
Returns the up-vector of the camera to a pre-allocated array
double const* TK_Camera::GetDUpVector | ( | ) | const [inline] |
Returns the up-vector of the camera as the address of a float triplet
void TK_Camera::GetField | ( | float * | f | ) | const [inline] |
Returns the camera field size to a pre-allocated array
float const* TK_Camera::GetField | ( | ) | const [inline] |
Returns the camera field size as the address of a float pair
float TK_Camera::GetNearLimit | ( | ) | const [inline] |
Returns the camera field size as the address of a float pair
void TK_Camera::GetOblique | ( | float * | o | ) | const [inline] |
Returns the camera oblique angles to a pre-allocated array
float const* TK_Camera::GetOblique | ( | ) | const [inline] |
Returns the camera oblique angles as the address of a float pair
void TK_Camera::GetPosition | ( | float * | p | ) | const [inline] |
Returns the position of the camera to a pre-allocated array
float const* TK_Camera::GetPosition | ( | ) | const [inline] |
Returns the position of the camera as the address of a float triplet
int TK_Camera::GetProjection | ( | ) | const [inline] |
Returns the projection type. Projection types are specified by TKO_Camera_Projection.
void TK_Camera::GetTarget | ( | float * | t | ) | const [inline] |
Returns the target of the camera to a pre-allocated array
float const* TK_Camera::GetTarget | ( | ) | const [inline] |
Returns the target of the camera as the address of a float triplet
void TK_Camera::GetUpVector | ( | float * | u | ) | const [inline] |
Returns the up-vector of the camera to a pre-allocated array
float const* TK_Camera::GetUpVector | ( | ) | const [inline] |
Returns the up-vector of the camera as the address of a float triplet
char* TK_Camera::GetView | ( | ) | [inline] |
Returns the view name buffer, which may be modified directly
char const* TK_Camera::GetView | ( | ) | const [inline] |
Returns the view name.
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.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
void TK_Camera::SetDField | ( | double const * | f | ) | [inline] |
Sets the camera field size using a float pair
void TK_Camera::SetDField | ( | double | w, | |
double | h | |||
) | [inline] |
Sets the camera field size using discrete double values
void TK_Camera::SetDPosition | ( | double const * | p | ) | [inline] |
Sets the position of the camera using a double triplet
void TK_Camera::SetDPosition | ( | double | x, | |
double | y, | |||
double | z | |||
) | [inline] |
Sets the position of the camera using discrete double values
void TK_Camera::SetDTarget | ( | double const * | t | ) | [inline] |
Sets the target of the camera using a double triplet
void TK_Camera::SetDTarget | ( | double | x, | |
double | y, | |||
double | z | |||
) | [inline] |
Sets the target of the camera using discrete double values
void TK_Camera::SetDUpVector | ( | double const * | u | ) | [inline] |
Sets the up-vector of the camera using a float triplet
void TK_Camera::SetDUpVector | ( | double | x, | |
double | y, | |||
double | z | |||
) | [inline] |
Sets the up-vector of the camera using discrete double values
void TK_Camera::SetField | ( | float const * | f | ) | [inline] |
Sets the camera field size using a float pair
void TK_Camera::SetField | ( | float | w, | |
float | h | |||
) | [inline] |
Sets the camera field size using discrete float values
void TK_Camera::SetNearLimit | ( | float | l | ) | [inline] |
Sets the camera field size using discrete float values
References TKO_Camera_Near_Limit.
void TK_Camera::SetOblique | ( | float const * | o | ) | [inline] |
Sets the camera oblique angles (degrees) using a float pair
void TK_Camera::SetOblique | ( | float | h, | |
float | v | |||
) | [inline] |
Sets the camera oblique angles (degrees) using discrete float values
References TKO_Camera_Oblique_Mask, and TKO_Camera_Oblique_Y.
void TK_Camera::SetPosition | ( | float const * | p | ) | [inline] |
Sets the position of the camera using a float triplet
void TK_Camera::SetPosition | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
Sets the position of the camera using discrete float values
void TK_Camera::SetProjection | ( | int | p | ) | [inline] |
Sets the projection type. Projection types are specified by TKO_Camera_Projection.
void TK_Camera::SetTarget | ( | float const * | t | ) | [inline] |
Sets the target of the camera using a float triplet
void TK_Camera::SetTarget | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
Sets the target of the camera using discrete float values
void TK_Camera::SetUpVector | ( | float const * | u | ) | [inline] |
Sets the up-vector of the camera using a float triplet
void TK_Camera::SetUpVector | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
Sets the up-vector of the camera using discrete float values
void TK_Camera::SetView | ( | int | length | ) | [inline] |
Sets the view name buffer. Allocates a buffer which can hold a srting of 'length' characters
void TK_Camera::SetView | ( | char const * | name | ) | [inline] |
Sets the view name. Allocates the buffer and copies the string
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.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
float TK_Camera::m_details[3] [protected] |
internal use; stored in the following order: oblique(2), near_limit
double TK_Camera::m_dsettings[14] [protected] |
internal use; same as m_settings for double precision
int TK_Camera::m_length [protected] |
Length of view name
char* TK_Camera::m_name [protected] |
View name
float TK_Camera::m_settings[14] [protected] |
internal use; stored in the following order: position(3), target(3), up(3), width, height Position, target, and up are all object space. Width and height define the span of the minimum area around the target to be visible