|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <framework/components/light/lightComponent.h>
Public Member Functions | |
| float | areaHeight () const |
| float | areaWidth () const |
| float | cascadeBlend () const |
| float | cascadeDistribution () const |
| bool | castShadows () const |
| void | cloneFrom (const Component *source) override |
| const Color & | color () const |
| Vector3 | direction () const |
| LightFalloff | falloffMode () const |
| void | initializeComponentData () override |
| float | innerConeAngle () const |
| float | intensity () const |
| const std::vector< int > & | layers () const |
| Light * | light () const |
| LightComponent (IComponentSystem *system, Entity *entity) | |
| uint32_t | mask () const |
| int | numCascades () const |
| float | outerConeAngle () const |
| Vector3 | position () const |
| float | range () const |
| bool | rendersLayer (const int layerId) const |
| void | setAreaHeight (const float value) |
| void | setAreaWidth (const float value) |
| void | setCascadeBlend (const float value) |
| void | setCascadeDistribution (const float value) |
| void | setCastShadows (const bool castShadows) |
| void | setColor (const Color &color) |
| void | setFalloffMode (const LightFalloff mode) |
| void | setInnerConeAngle (const float angleDegrees) |
| void | setIntensity (const float intensity) |
| void | setLayers (const std::vector< int > &layers) |
| void | setMask (const uint32_t value) |
| void | setNumCascades (const int value) |
| void | setOuterConeAngle (const float angleDegrees) |
| void | setRange (const float range) |
| void | setShadowBias (const float value) |
| void | setShadowDistance (const float value) |
| void | setShadowNormalBias (const float value) |
| void | setShadowResolution (const int value) |
| void | setShadowStrength (const float value) |
| void | setType (const LightType type) |
| float | shadowBias () const |
| float | shadowDistance () const |
| float | shadowNormalBias () const |
| int | shadowResolution () const |
| float | shadowStrength () const |
| LightType | type () const |
| ~LightComponent () override | |
| Public Member Functions inherited from visutwin::canvas::Component | |
| Component (IComponentSystem *system, Entity *entity) | |
| virtual bool | enabled () const |
| Entity * | entity () const |
| virtual void | onDisable () |
| virtual void | onEnable () |
| virtual void | onPostStateChange () |
| virtual void | setEnabled (bool value) |
| IComponentSystem * | system () const |
| virtual | ~Component ()=default |
| Public Member Functions inherited from visutwin::canvas::EventHandler | |
| template<typename... Args> | |
| EventHandler * | fire (const std::string &name, Args &&... args) |
| bool | hasEvent (const std::string &name) const |
| void | initEventHandler () |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandler * | off (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandler * | off (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr) |
| EventHandler * | offByHandle (EventHandle *handle) |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandle * | on (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandle * | on (const std::string &name, HandleEventCallback callback, void *scope=nullptr) |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandle * | once (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandle * | once (const std::string &name, HandleEventCallback callback, void *scope=nullptr) |
| virtual | ~EventHandler ()=default |
Static Public Member Functions | |
| static const std::vector< LightComponent * > & | instances () |
Additional Inherited Members | |
| Protected Member Functions inherited from visutwin::canvas::Component | |
| virtual void | onSetEnabled (bool oldValue, bool newValue) |
| Protected Member Functions inherited from visutwin::canvas::EventHandler | |
| EventHandle * | addCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false) |
| Protected Attributes inherited from visutwin::canvas::Component | |
| bool | _enabled = true |
| Entity * | _entity |
Definition at line 25 of file lightComponent.h.
| visutwin::canvas::LightComponent::LightComponent | ( | IComponentSystem * | system, |
| Entity * | entity ) |
Definition at line 15 of file lightComponent.cpp.
References visutwin::canvas::Component::Component(), visutwin::canvas::Component::entity(), and visutwin::canvas::Component::system().
Referenced by cloneFrom().
|
override |
Definition at line 20 of file lightComponent.cpp.
|
inline |
Definition at line 92 of file lightComponent.h.
|
inline |
Definition at line 90 of file lightComponent.h.
|
inline |
Definition at line 86 of file lightComponent.h.
|
inline |
Definition at line 83 of file lightComponent.h.
|
inline |
Definition at line 62 of file lightComponent.h.
Referenced by setCastShadows().
|
overridevirtual |
Copies all light properties from a source LightComponent.
Reimplemented from visutwin::canvas::Component.
Definition at line 67 of file lightComponent.cpp.
References visutwin::canvas::Component::Component(), LightComponent(), and visutwin::canvas::Component::setEnabled().
|
inline |
Definition at line 38 of file lightComponent.h.
Referenced by setColor().
| Vector3 visutwin::canvas::LightComponent::direction | ( | ) | const |
Definition at line 97 of file lightComponent.cpp.
References visutwin::canvas::Component::_entity, visutwin::canvas::Vector3::lengthSquared(), and visutwin::canvas::Vector3::normalized().
|
inline |
Definition at line 56 of file lightComponent.h.
|
inlineoverridevirtual |
Implements visutwin::canvas::Component.
Definition at line 31 of file lightComponent.h.
|
inline |
Definition at line 50 of file lightComponent.h.
|
inlinestatic |
Definition at line 33 of file lightComponent.h.
Referenced by visutwin::canvas::ForwardRenderer::buildFrameGraph(), visutwin::canvas::Renderer::cullShadowmaps(), and visutwin::canvas::Renderer::renderForwardLayer().
|
inline |
Definition at line 41 of file lightComponent.h.
Referenced by setIntensity().
|
inline |
Definition at line 99 of file lightComponent.h.
Referenced by setLayers().
| Light * visutwin::canvas::LightComponent::light | ( | ) | const |
Definition at line 28 of file lightComponent.cpp.
|
inline |
Definition at line 59 of file lightComponent.h.
|
inline |
Definition at line 80 of file lightComponent.h.
|
inline |
Definition at line 53 of file lightComponent.h.
| Vector3 visutwin::canvas::LightComponent::position | ( | ) | const |
Definition at line 114 of file lightComponent.cpp.
References visutwin::canvas::Component::_entity.
|
inline |
Definition at line 47 of file lightComponent.h.
Referenced by setRange().
|
inline |
Definition at line 101 of file lightComponent.h.
|
inline |
Definition at line 93 of file lightComponent.h.
|
inline |
Definition at line 91 of file lightComponent.h.
|
inline |
Definition at line 87 of file lightComponent.h.
|
inline |
Definition at line 84 of file lightComponent.h.
|
inline |
Definition at line 63 of file lightComponent.h.
References castShadows().
|
inline |
Definition at line 39 of file lightComponent.h.
References color().
|
inline |
Definition at line 57 of file lightComponent.h.
|
inline |
Definition at line 51 of file lightComponent.h.
|
inline |
Definition at line 42 of file lightComponent.h.
References intensity().
|
inline |
Definition at line 100 of file lightComponent.h.
References layers().
|
inline |
Definition at line 60 of file lightComponent.h.
|
inline |
Definition at line 81 of file lightComponent.h.
|
inline |
Definition at line 54 of file lightComponent.h.
|
inline |
Definition at line 48 of file lightComponent.h.
References range().
|
inline |
Definition at line 66 of file lightComponent.h.
|
inline |
Definition at line 75 of file lightComponent.h.
|
inline |
Definition at line 69 of file lightComponent.h.
|
inline |
Definition at line 78 of file lightComponent.h.
|
inline |
Definition at line 72 of file lightComponent.h.
|
inline |
Definition at line 45 of file lightComponent.h.
References type().
|
inline |
Definition at line 65 of file lightComponent.h.
|
inline |
Definition at line 74 of file lightComponent.h.
|
inline |
Definition at line 68 of file lightComponent.h.
|
inline |
Definition at line 77 of file lightComponent.h.
|
inline |
Definition at line 71 of file lightComponent.h.
|
inline |
Definition at line 44 of file lightComponent.h.
Referenced by setType().