TK_Camera
-
class
TK_Camera Handles the TKE_Camera opcode.
TK_Cameraprovides 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.
Inherits from:
BBaseOpcodeHandlerIndex
Methods
Clone()GetDField()GetDField()GetDPosition()GetDPosition()GetDTarget()GetDTarget()GetDUpVector()GetDUpVector()GetField()GetField()GetNearLimit()GetOblique()GetOblique()GetPosition()GetPosition()GetProjection()GetTarget()GetTarget()GetUpVector()GetUpVector()GetView()GetView()Read()ReadAscii()set_name()set_name()SetDField()SetDField()SetDPosition()SetDPosition()SetDTarget()SetDTarget()SetDUpVector()SetDUpVector()SetField()SetField()SetNearLimit()SetOblique()SetOblique()SetPosition()SetPosition()SetProjection()SetTarget()SetTarget()SetUpVector()SetUpVector()SetView()SetView()TK_Camera()Write()WriteAscii()~TK_Camera()
Variables
Methods
-
TK_Camera::TK_Camera(unsigned char opcode = TKE_Camera) constructor
-
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Camera::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const const virtual
Copies the opcode handler
Parameters
tk: A reference to the
BStreamFileToolkitobject.handler: A pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.
-
TK_Status
TK_Camera::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Camera::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_Camera::SetPosition(float x, float y, float z) Sets the position of the camera using discrete float values
-
float const *
TK_Camera::GetPosition() const const
Returns the position of the camera as the address of a float triplet
-
void
TK_Camera::GetPosition(float p[]) const const
Returns the position of the camera to a pre-allocated array
-
void
TK_Camera::SetDPosition(double x, double y, double z) Sets the position of the camera using discrete double values
-
void
TK_Camera::SetDPosition(double const p[]) Sets the position of the camera using a double triplet
-
double const *
TK_Camera::GetDPosition() const const
Returns the position of the camera as the address of a double triplet
-
void
TK_Camera::GetDPosition(double p[]) const const
Returns the position of the camera to a pre-allocated array
-
void
TK_Camera::SetTarget(float x, float y, float z) Sets the target of the camera using discrete float values
-
float const *
TK_Camera::GetTarget() const const
Returns the target of the camera as the address of a float triplet
-
void
TK_Camera::GetTarget(float t[]) const const
Returns the target of the camera to a pre-allocated array
-
void
TK_Camera::SetDTarget(double x, double y, double z) Sets the target of the camera using discrete double values
-
double const *
TK_Camera::GetDTarget() const const
Returns the target of the camera as the address of a float triplet
-
void
TK_Camera::GetDTarget(double t[]) const const
Returns the target of the camera to a pre-allocated array
-
void
TK_Camera::SetUpVector(float x, float y, float z) Sets the up-vector of the camera using discrete float values
-
void
TK_Camera::SetUpVector(float const u[]) Sets the up-vector of the camera using a float triplet
-
float const *
TK_Camera::GetUpVector() const const
Returns the up-vector of the camera as the address of a float triplet
-
void
TK_Camera::GetUpVector(float u[]) const const
Returns the up-vector of the camera to a pre-allocated array
-
void
TK_Camera::SetDUpVector(double x, double y, double z) Sets the up-vector of the camera using discrete double values
-
void
TK_Camera::SetDUpVector(double const u[]) Sets the up-vector of the camera using a float triplet
-
double const *
TK_Camera::GetDUpVector() const const
Returns the up-vector of the camera as the address of a float triplet
-
void
TK_Camera::GetDUpVector(double u[]) const const
Returns the up-vector of the camera to a pre-allocated array
-
float const *
TK_Camera::GetField() const const
Returns the camera field size as the address of a float pair
-
void
TK_Camera::GetField(float f[]) const const
Returns the camera field size to a pre-allocated array
-
void
TK_Camera::SetDField(double w, double h) Sets the camera field size using discrete double values
-
double const *
TK_Camera::GetDField() const const
Returns the camera field size as the address of a float pair
-
void
TK_Camera::GetDField(double f[]) const const
Returns the camera field size to a pre-allocated array
-
void
TK_Camera::SetOblique(float h, float v) Sets the camera oblique angles (degrees) using discrete float values
-
void
TK_Camera::SetOblique(float const o[]) Sets the camera oblique angles (degrees) using a float pair
-
float const *
TK_Camera::GetOblique() const const
Returns the camera oblique angles as the address of a float pair
-
void
TK_Camera::GetOblique(float o[]) const const
Returns the camera oblique angles to a pre-allocated array
-
float
TK_Camera::GetNearLimit() const const
Returns the camera field size as the address of a float pair
-
void
TK_Camera::SetProjection(int p) Sets the projection type. Projection types are specified by
TKO_Camera_Projection.
-
int
TK_Camera::GetProjection() const const
Returns the projection type. Projection types are specified by
TKO_Camera_Projection.
-
void
TK_Camera::SetView(char const *name) Sets the view name. Allocates the buffer and copies the string
-
void
TK_Camera::SetView(int length) Sets the view name buffer. Allocates a buffer which can hold a srting of ‘length’ characters
Variables
-
float
TK_Camera::m_settings[14] protected
floatinternal 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
-
double
TK_Camera::m_dsettings[14] protected
doubleinternal use; same as m_settings for double precision