#include <light.h>
Inheritance diagram for ScEng::SourceLight:

Public Types | |
| enum | DATAID { , id_color, id_intensity, id_use_near_att, id_near_att_start, id_near_att_end, id_use_far_att, id_far_att_start, id_far_att_end, id_hotspot, id_falloff } |
| enum | CHUNKS |
| enum | TYPES { TYPE_POINT = 1, TYPE_SPOT = 2, TYPE_PARALLEL = 3 } |
| enum | DEPENDENCIES { LIGHT_TARGET_DEPENDENCY = 0, DATA_TABLE_DEPENDENCY = 1 } |
Public Member Functions | |
| SourceLight (bool create_dependencies) | |
| Constructor. | |
| ~SourceLight () | |
| Destructor. | |
| Node * | GetTarget () |
| Returns the light target. | |
| int | GetType (int t) |
| GMT::Color | GetColor (int t) |
| Returns the color of the light. | |
| float | GetIntensity (int t) |
| Returns the intensity of the light. | |
| int | GetUseNearAtt (int t) |
| Returns if the light uses the near attenuation. | |
| float | GetNearAttStart (int t) |
| Returns the near attenuation start value. | |
| float | GetNearAttEnd (int t) |
| Returns the near attenuation end value. | |
| int | GetUseFarAtt (int t) |
| Returns if the light uses the far attenuation. | |
| float | GetFarAttStart (int t) |
| Returns the far attenuation start value. | |
| float | GetFarAttEnd (int t) |
| Returns the far attenuation end value. | |
| float | GetHotspot (int t) |
| Returns the Hotspot value. | |
| float | GetFalloff (int t) |
| Returns the Falloff value. | |
| void | SetTarget (Node *target_node) |
| void | SetType (int type_val, int t) |
| void | SetColor (GMT::Color color_val, int t) |
| Sets the color for the light. | |
| void | SetIntensity (float intensity_val, int t) |
| Sets the intensity. | |
| void | SetUseNearAtt (int use_near_att_val, int t) |
| Sets if the light uses the near attenuation. | |
| void | SetNearAttStart (float near_att_start_val, int t) |
| Sets the near attenuation start value. | |
| void | SetNearAttEnd (float near_att_end_val, int t) |
| Sets the near attenuation end value. | |
| void | SetUseFarAtt (int use_far_att_val, int t) |
| Sets if the light uses the far attenuation. | |
| void | SetFarAttStart (float far_att_start_val, int t) |
| Sets the far attenuation start value. | |
| void | SetFarAttEnd (float far_att_end_val, int t) |
| Sets the far attenuation end value. | |
| void | SetHotspot (float hotspot_val, int t) |
| Sets the Hotspot value. | |
| void | SetFalloff (float falloff_val, int t) |
| Sets the Falloff value. | |
| std::string | GetClassName () |
| BlockType | GetBlockType () |
| int | NumDependencies () |
| void | SetDependency (int id, Block *se_block) |
| Block * | GetDependency (int id) |
| std::string | GetDependencyName (int id) |
| Gets the name for the specified dependency. | |
| int | GetNumDataTables () |
| DataTable * | GetDataTable (int id=0) |
| Returns the DataTable for this class. | |
| void | SetDataTable (DataTable *d, int i=0) |
| Sets the i_th data table. | |
| void | UpdateDataTable (int id=0) |
| Updates the indexes for the DataTable. | |
| int | Save (SceneSave *scene_save) |
| Saves the info for this class. | |
| int | Load (SceneLoad *scene_load) |
| Loads the infor for this class. | |
| void | DeleteThis () |
| Delete this class. | |
| void | ActionBegin (int time, int action) |
| void | ActionEnd (int time, int action) |
| void | Update (int time) |
| Block * | Clone () |
Static Public Attributes | |
| static BlockType | block_type |
Enum DATAID Enums the Ids for the differents Data for the Light
| id_color | <The id for the type in the DataTable |
| id_intensity | <The id for the color attribute |
| id_use_near_att | <The id for the intensity in the DataTable |
| id_near_att_start | <The id for the use near attenuation in the DataTable |
| id_near_att_end | <The id for the near attenuation start in the DataTable |
| id_use_far_att | <The id for the near attenuation end in the DataTable |
| id_far_att_start | <The id for the use far attenuation in the DataTable |
| id_far_att_end | <The id for the far attenuation start in the DataTable |
| id_hotspot | <The id for the far attenuation end in the DataTable |
| id_falloff | <The id for the falloff in the DataTable |
Enum Chunks Enums the chunks used for this class
Enum DEPENDENCIES Enums the dependencies for this class
| LIGHT_TARGET_DEPENDENCY | A dependency to the light´s target |
| DATA_TABLE_DEPENDENCY | The DataTable dependency |
| int ScEng::SourceLight::GetType | ( | int | t | ) |
Returns the type of the light
| void ScEng::SourceLight::SetTarget | ( | Node * | target_node | ) | [virtual] |
Sets the camera target Sets the target using MakeDependencyByID
| target_node | the Node to be used as target |
Implements ScEng::LightObject.
| void ScEng::SourceLight::SetType | ( | int | type_val, | |
| int | t | |||
| ) |
| std::string ScEng::SourceLight::GetClassName | ( | ) | [virtual] |
| BlockType ScEng::SourceLight::GetBlockType | ( | ) | [virtual] |
Returns the BlockType for this class
Implements ScEng::Block.
| int ScEng::SourceLight::NumDependencies | ( | ) | [virtual] |
| void ScEng::SourceLight::SetDependency | ( | int | id, | |
| Block * | se_block | |||
| ) | [virtual] |
Sets a Dependency If the id is LIGHT_TARGET_DEPENDENCY the target will be set. If is DATA_TABLE_DEPENDENCY the DataTable will be set
| id | the if for the dependency | |
| se_block | the block to be dependency |
Implements ScEng::Block.
| Block * ScEng::SourceLight::GetDependency | ( | int | id | ) | [virtual] |
Returns the dependency
| id | the id for the dependency |
Implements ScEng::Block.
| int ScEng::SourceLight::GetNumDataTables | ( | ) | [virtual] |
Returns the number of DataTables used for this class
Reimplemented from ScEng::Block.
| void ScEng::SourceLight::ActionBegin | ( | int | time, | |
| int | action | |||
| ) | [inline, virtual] |
Informs the block that an action will begin
| time | the time at which the action begins. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION. |
Reimplemented from ScEng::Block.
| void ScEng::SourceLight::ActionEnd | ( | int | time, | |
| int | action | |||
| ) | [inline, virtual] |
Informs the block that an action will end.
| time | the time at which the action ends. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION. |
Reimplemented from ScEng::Block.
| void ScEng::SourceLight::Update | ( | int | time | ) | [inline, virtual] |
Informs the block that it needs to update its data. For example, texture and material blocks usually move all their animated parameters from the data_table to int or float variables. This is specially useful when rendering, so there is no need to interpolate a data_value every time.
| time | the time at which the block needs to update its data. |
Reimplemented from ScEng::Block.
| Block * ScEng::SourceLight::Clone | ( | ) | [virtual] |
Creates a copy of this object and return it. The caller of this function is responsible to add this block to the DAG or to delete it.
Implements ScEng::Block.
BlockType ScEng::SourceLight::block_type [static] |
The type of this block BlockType SourceLight::block_type( BlockType::LIGHT, 0x00600000, 0x00000000 );
1.5.1-p1