|
CSEngine
|
Public Types | |
| enum | LIGHT { NONE = 0 , DIRECTIONAL = 1 , POINT = 2 , SPOT = 3 } |
Public Types inherited from CSE::CameraBase | |
| enum | BackgroundType { NONE = 0 , SOLID = 1 , SKYBOX = 2 } |
Public Member Functions | |
| COMPONENT_DEFINE_CONSTRUCTOR (LightComponent) | |
| void | Exterminate () override |
| void | Init () override |
| void | Tick (float elapsedTime) override |
| void | SetLightType (LIGHT type) |
| void | SetDirection (const vec4 &direction) const |
| void | SetColor (const vec3 &color) const |
| LIGHT | GetType () const |
| vec4 | GetDirection (const vec4 &direction) const |
| vec3 | GetColor () const |
| void | SetLightRadius (float radius) const |
| void | SetAttenuationFactor (const vec3 &att) const |
| void | SetAttenuationFactor (float Kc, float Kl, float Kq) const |
| void | SetSunrising (bool active) |
| SLight * | GetLight () const |
| void | SetShadow (bool isActive) |
| SComponent * | Clone (SGameObject *object) override |
| void | SetValue (std::string name_str, Arguments value) override |
| std::string | PrintValue () const override |
| const mat4 & | GetLightProjectionMatrix () const |
| const mat4 & | GetLightViewMatrix () const |
| CameraMatrixStruct | GetCameraMatrixStruct () const override |
| SFrameBuffer * | GetFrameBuffer () const override |
| bool | IsShadow () const |
| int | BindShadow (const GLProgramHandle &handle, int handleIndex, int layout) const |
| void | RenderBackground () const override |
Public Member Functions inherited from CSE::SComponent | |
| SComponent (std::string classType, SGameObject *gameObject) | |
| SComponent (SGameObject *gameObject) | |
| SComponent (const SComponent &src) | |
| void | Start () override |
| virtual void | CopyReference (SComponent *src, std::map< SGameObject *, SGameObject * > lists_obj, std::map< SComponent *, SComponent * > lists_comp) |
| virtual auto | GetComponent () -> SObject * |
| void | SetValue (std::string name_str, Arguments value) override |
| std::string | PrintValue () const override |
| void | SetGameObject (SGameObject *object) |
| virtual SGameObject * | GetGameObject () const |
| virtual bool | GetIsEnable () const |
| virtual void | SetIsEnable (bool is_enable) |
Public Member Functions inherited from CSE::SObject | |
| SObject (bool isRegister) | |
| virtual void | SetUndestroyable (bool enable) |
| virtual void | Destroy () |
| std::string | GetHash () const |
| virtual void | SetHash (std::string &hash) |
Public Member Functions inherited from CSE::SISComponent | |
| SISComponent (const SISComponent &src)=default | |
Public Member Functions inherited from CSE::VariableBinder | |
Public Member Functions inherited from CSE::ReflectionObject | |
| ReflectionObject (std::string type) | |
| void | SetClassType (std::string type) |
| const char * | GetClassType () const |
| bool | IsSameClass (const char *classType) const |
Public Member Functions inherited from CSE::CameraBase | |
| virtual BackgroundType | GetBackgroundType () |
Public Attributes | |
| LIGHT | m_type = DIRECTIONAL |
Additional Inherited Members | |
Static Public Member Functions inherited from CSE::ReflectionObject | |
| static ReflectionObject * | NewObject (const std::string &name) |
Protected Types inherited from CSE::VariableBinder | |
| typedef std::vector< std::string > | Arguments |
Protected Member Functions inherited from CSE::VariableBinder | |
Protected Attributes inherited from CSE::SComponent | |
| SGameObject * | gameObject = nullptr |
| bool | isEnable = true |
Protected Attributes inherited from CSE::SObject | |
| std::string | m_hash |
Protected Attributes inherited from CSE::ReflectionObject | |
| std::string | m_class |
Definition at line 13 of file LightComponent.h.
| enum CSE::LightComponent::LIGHT |
Definition at line 16 of file LightComponent.h.
| int LightComponent::BindShadow | ( | const GLProgramHandle & | handle, |
| int | handleIndex, | ||
| int | layout ) const |
Definition at line 194 of file LightComponent.cpp.
|
overridevirtual |
Reimplemented from CSE::SComponent.
Definition at line 140 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::SObject.
Definition at line 22 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::CameraBase.
Definition at line 208 of file LightComponent.cpp.
| vec3 LightComponent::GetColor | ( | ) | const |
Definition at line 132 of file LightComponent.cpp.
Definition at line 128 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::CameraBase.
Definition at line 214 of file LightComponent.cpp.
|
inline |
Definition at line 52 of file LightComponent.h.
| const mat4 & LightComponent::GetLightProjectionMatrix | ( | ) | const |
Definition at line 186 of file LightComponent.cpp.
| const mat4 & LightComponent::GetLightViewMatrix | ( | ) | const |
Definition at line 190 of file LightComponent.cpp.
| LightComponent::LIGHT LightComponent::GetType | ( | ) | const |
Definition at line 124 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::SISComponent.
Definition at line 29 of file LightComponent.cpp.
| bool LightComponent::IsShadow | ( | ) | const |
Definition at line 218 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::VariableBinder.
Definition at line 171 of file LightComponent.cpp.
|
inlineoverridevirtual |
| void LightComponent::SetAttenuationFactor | ( | const vec3 & | att | ) | const |
Definition at line 86 of file LightComponent.cpp.
| void LightComponent::SetAttenuationFactor | ( | float | Kc, |
| float | Kl, | ||
| float | Kq ) const |
Definition at line 90 of file LightComponent.cpp.
| void LightComponent::SetColor | ( | const vec3 & | color | ) | const |
Definition at line 78 of file LightComponent.cpp.
| void LightComponent::SetDirection | ( | const vec4 & | direction | ) | const |
Definition at line 65 of file LightComponent.cpp.
| void LightComponent::SetLightRadius | ( | float | radius | ) | const |
Definition at line 82 of file LightComponent.cpp.
| void LightComponent::SetLightType | ( | LIGHT | type | ) |
Definition at line 54 of file LightComponent.cpp.
|
inline |
Definition at line 56 of file LightComponent.h.
| void LightComponent::SetSunrising | ( | bool | active | ) |
Definition at line 136 of file LightComponent.cpp.
|
overridevirtual |
Used to get serialized values. All classes that inherit from VariableBinder will unconditionally call this function first during initialization.
| name_str | Name of values |
| value | Serialized values |
Implements CSE::VariableBinder.
Definition at line 153 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::SISComponent.
Definition at line 34 of file LightComponent.cpp.
| LIGHT CSE::LightComponent::m_type = DIRECTIONAL |
Definition at line 85 of file LightComponent.h.