Handles the TKE_Spot_Light opcode. More...
#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
float | GetConcentration () const |
double const * | GetDPosition () const |
double const * | GetDTarget () const |
float | GetInner () const |
int | GetOptions () const |
float | GetOuter () const |
float const * | GetPosition () const |
float const * | GetTarget () const |
TK_Status | Read (BStreamFileToolkit &tk) |
TK_Status | ReadAscii (BStreamFileToolkit &tk) |
Deprecated. | |
void | SetConcentration (float c) |
void | SetDPosition (double x, double y, double z) |
void | SetDPosition (double const *p) |
void | SetDTarget (double x, double y, double z) |
void | SetDTarget (double const *t) |
void | SetInner (float i) |
void | SetOptions (int o) |
void | SetOuter (float o) |
void | SetPosition (float x, float y, float z) |
void | SetPosition (float const *p) |
void | SetTarget (float x, float y, float z) |
void | SetTarget (float const *t) |
TK_Spot_Light () | |
TK_Status | Write (BStreamFileToolkit &tk) |
TK_Status | WriteAscii (BStreamFileToolkit &tk) |
Deprecated. | |
Protected Attributes | |
float | m_concentration |
for internal use only | |
double | m_dposition [3] |
for internal use only | |
double | m_dtarget [3] |
for internal use only | |
float | m_inner |
for internal use only | |
char | m_options |
for internal use only | |
float | m_outer |
for internal use only | |
float | m_position [3] |
for internal use only | |
float | m_target [3] |
for internal use only |
Handles the TKE_Spot_Light opcode.
TK_Spot_Light provides support for writing/reading the TKE_Spot_Light opcode object to/from an HSF file.
The HOOPS/3dGS scene-graph supports 'spot-lights' which define a light cone
TK_Spot_Light::TK_Spot_Light | ( | ) | [inline] |
constructor
TK_Status TK_Spot_Light::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.
float TK_Spot_Light::GetConcentration | ( | ) | const [inline] |
Returns the concentration of the light
double const* TK_Spot_Light::GetDPosition | ( | ) | const [inline] |
Returns the position of the lihgt as the address of a float triplet
double const* TK_Spot_Light::GetDTarget | ( | ) | const [inline] |
Returns the target of the lihgt as the address of a float triplet
float TK_Spot_Light::GetInner | ( | ) | const [inline] |
Returns the inner cone angle of the light
int TK_Spot_Light::GetOptions | ( | ) | const [inline] |
Returns the options for the light. Options are specified by TKO_Spot_Light_Options.
float TK_Spot_Light::GetOuter | ( | ) | const [inline] |
Returns the outer cone angle of the light
float const* TK_Spot_Light::GetPosition | ( | ) | const [inline] |
Returns the position of the lihgt as the address of a float triplet
float const* TK_Spot_Light::GetTarget | ( | ) | const [inline] |
Returns the target of the lihgt as the address of a float triplet
TK_Status TK_Spot_Light::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_Spot_Light::SetConcentration | ( | float | c | ) | [inline] |
Sets the concentration of the light
void TK_Spot_Light::SetDPosition | ( | double | x, |
double | y, | ||
double | z | ||
) | [inline] |
Sets the position of the light using discrete double values
void TK_Spot_Light::SetDPosition | ( | double const * | p | ) | [inline] |
Sets the position of the light using a float triplet
References SetDPosition().
Referenced by SetDPosition().
void TK_Spot_Light::SetDTarget | ( | double | x, |
double | y, | ||
double | z | ||
) | [inline] |
Sets the target of the light using discrete double values
void TK_Spot_Light::SetDTarget | ( | double const * | t | ) | [inline] |
Sets the target of the light using a float triplet
References SetDTarget().
Referenced by SetDTarget().
void TK_Spot_Light::SetInner | ( | float | i | ) | [inline] |
Sets the inner cone angle of the light
void TK_Spot_Light::SetOptions | ( | int | o | ) | [inline] |
Sets the options for the light. Options are specified by TKO_Spot_Light_Options.
void TK_Spot_Light::SetOuter | ( | float | o | ) | [inline] |
Sets the outer cone angle of the light
void TK_Spot_Light::SetPosition | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Sets the position of the light using discrete float values
void TK_Spot_Light::SetPosition | ( | float const * | p | ) | [inline] |
Sets the position of the light using a float triplet
References SetPosition().
Referenced by SetPosition().
void TK_Spot_Light::SetTarget | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Sets the target of the light using discrete float values
void TK_Spot_Light::SetTarget | ( | float const * | t | ) | [inline] |
Sets the target of the light using a float triplet
References SetTarget().
Referenced by SetTarget().
TK_Status TK_Spot_Light::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.