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 |
void | BindShadow (const GLProgramHandle &handle, int handleIndex, int index) const |
void | RenderBackground () const override |
Public Member Functions inherited from CSE::SComponent | |
SComponent (std::string classType, 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) |
std::string | GetClassType () const |
void | SetClassType (std::string type) |
Public Member Functions inherited from CSE::SObject | |
SObject (bool isRegister) | |
virtual void | SetUndestroyable (bool enable) |
virtual void | Destroy () |
virtual void | __FORCE_DESTROY__ () |
virtual std::string | GenerateMeta () |
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::CameraBase | |
virtual BackgroundType | GetBackgroundType () |
Public Attributes | |
LIGHT | m_type = DIRECTIONAL |
Additional Inherited Members | |
Protected Types inherited from CSE::VariableBinder | |
typedef std::vector< std::string > | Arguments |
Protected Attributes inherited from CSE::SComponent | |
SGameObject * | gameObject = nullptr |
bool | isEnable = true |
std::string | m_classType |
Protected Attributes inherited from CSE::SObject | |
std::string | m_hash |
Definition at line 13 of file LightComponent.h.
enum CSE::LightComponent::LIGHT |
Definition at line 16 of file LightComponent.h.
void LightComponent::BindShadow | ( | const GLProgramHandle & | handle, |
int | handleIndex, | ||
int | index | ||
) | const |
Definition at line 190 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 198 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 203 of file LightComponent.cpp.
|
inline |
Definition at line 52 of file LightComponent.h.
const mat4 & LightComponent::GetLightProjectionMatrix | ( | ) | const |
Definition at line 182 of file LightComponent.cpp.
const mat4 & LightComponent::GetLightViewMatrix | ( | ) | const |
Definition at line 186 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 207 of file LightComponent.cpp.
|
overridevirtual |
Implements CSE::VariableBinder.
Definition at line 169 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 |
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.