TK_Spot_Light

class TK_Spot_Light

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

Inherits from: BBaseOpcodeHandler

Methods

TK_Spot_Light::TK_Spot_Light()

constructor

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.

Parameters

tk: A reference to the BStreamFileToolkit object.

Returns

The result of the function call.
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.

Parameters

tk: A reference to the BStreamFileToolkit object.

Returns

The result of the function call.
TK_Status TK_Spot_Light::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

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.
TK_Status TK_Spot_Light::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_Spot_Light::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Spot_Light::SetPosition(float x, float y, float z)

Sets the position of the light using discrete float values

void TK_Spot_Light::SetPosition(float const p[])

Sets the position of the light using a float triplet

float const *TK_Spot_Light::GetPosition() const

const

Returns the position of the lihgt as the address of a float triplet

void TK_Spot_Light::SetDPosition(double x, double y, double z)

Sets the position of the light using discrete double values

void TK_Spot_Light::SetDPosition(double const p[])

Sets the position of the light using a float triplet

double const *TK_Spot_Light::GetDPosition() const

const

Returns the position of the lihgt as the address of a float triplet

void TK_Spot_Light::SetTarget(float x, float y, float z)

Sets the target of the light using discrete float values

void TK_Spot_Light::SetTarget(float const t[])

Sets the target of the light using a float triplet

float const *TK_Spot_Light::GetTarget() const

const

Returns the target of the lihgt as the address of a float triplet

void TK_Spot_Light::SetDTarget(double x, double y, double z)

Sets the target of the light using discrete double values

void TK_Spot_Light::SetDTarget(double const t[])

Sets the target of the light using a float triplet

double const *TK_Spot_Light::GetDTarget() const

const

Returns the target of the lihgt as the address of a float triplet

void TK_Spot_Light::SetOuter(float o)

Sets the outer cone angle of the light

float TK_Spot_Light::GetOuter() const

const

Returns the outer cone angle of the light

void TK_Spot_Light::SetInner(float i)

Sets the inner cone angle of the light

float TK_Spot_Light::GetInner() const

const

Returns the inner cone angle of the light

void TK_Spot_Light::SetConcentration(float c)

Sets the concentration of the light

float TK_Spot_Light::GetConcentration() const

const

Returns the concentration of the light

void TK_Spot_Light::SetOptions(int o)

Sets the options for the light. Options are specified by TKO_Spot_Light_Options.

int TK_Spot_Light::GetOptions() const

const

Returns the options for the light. Options are specified by TKO_Spot_Light_Options.

Variables

float TK_Spot_Light::m_position[3]

protected

float

for internal use only

float TK_Spot_Light::m_target[3]

protected

float

for internal use only

double TK_Spot_Light::m_dposition[3]

protected

double

for internal use only

double TK_Spot_Light::m_dtarget[3]

protected

double

for internal use only

float TK_Spot_Light::m_outer

protected

float

for internal use only

float TK_Spot_Light::m_inner

protected

float

for internal use only

float TK_Spot_Light::m_concentration

protected

float

for internal use only

char TK_Spot_Light::m_options

protected

char

for internal use only