17 #include <ht_shadervariablechunk.h> 18 #include <ht_meshrenderer.h> 19 #include <ht_component.h> 40 virtual bool VDeserialize(
const Core::JSON& jsonObject)
override;
42 void SetType(LightType lightType);
61 bool SetMeshAndMaterial(std::string meshFile, std::string materialFile);
63 LightType m_lightType;
64 Graphics::MeshRenderer* m_meshRenderer;
65 Graphics::MeshHandle m_mesh;
66 Graphics::MaterialHandle m_material;
70 Math::Vector3 m_attenuation;
73 Math::Vector3 m_direction;
76 Graphics::ShaderVariableChunk* m_data;
77 Math::Vector4 m_color;
Component * VClone() const override
Creates a copy of this Component.
Definition: ht_light_component.cpp:189
void VOnEnabled() override
Called when the Component is enabled.
Definition: ht_light_component.cpp:209
void SetType(LightType lightType)
Sets the light to the specified type with proper data.
Definition: ht_light_component.cpp:105
void VOnDestroy() override
Called when the GameObject is destroyed/deleted.
Definition: ht_light_component.cpp:229
Definition: ht_component.h:42
Definition: ht_light_component.h:34
void VOnUpdate() override
Called once per frame while the GameObject is enabled.
Definition: ht_light_component.cpp:177
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_glfwkeyboard.h:21
virtual Core::JSON VSerialize(void) override
Saves light as JSON.
Definition: ht_light_component.cpp:45
virtual bool VDeserialize(const Core::JSON &jsonObject) override
Constructs light from JSON.
Definition: ht_light_component.cpp:53
void VOnInit() override
Called when the GameObject is created to initialize all values.
Definition: ht_light_component.cpp:130
virtual Core::Guid VGetComponentId(void) const override
Retrieves the id associated with this class of Component.
Definition: ht_light_component.cpp:200
void VOnDisabled() override
Called when the Component is disabled.
Definition: ht_light_component.cpp:219