VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::LightComponent Class Reference

#include <framework/components/light/lightComponent.h>

Inheritance diagram for visutwin::canvas::LightComponent:
[legend]

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 Colorcolor () const
Vector3 direction () const
LightFalloff falloffMode () const
void initializeComponentData () override
float innerConeAngle () const
float intensity () const
const std::vector< int > & layers () const
Lightlight () 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
Entityentity () const
virtual void onDisable ()
virtual void onEnable ()
virtual void onPostStateChange ()
virtual void setEnabled (bool value)
IComponentSystemsystem () const
virtual ~Component ()=default
Public Member Functions inherited from visutwin::canvas::EventHandler
template<typename... Args>
EventHandlerfire (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>)
EventHandleroff (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleroff (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr)
EventHandleroffByHandle (EventHandle *handle)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleon (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleon (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleonce (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleonce (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
EventHandleaddCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false)
Protected Attributes inherited from visutwin::canvas::Component
bool _enabled = true
Entity_entity

Detailed Description

Definition at line 25 of file lightComponent.h.

Constructor & Destructor Documentation

◆ LightComponent()

visutwin::canvas::LightComponent::LightComponent ( IComponentSystem * system,
Entity * entity )

◆ ~LightComponent()

visutwin::canvas::LightComponent::~LightComponent ( )
override

Definition at line 20 of file lightComponent.cpp.

Member Function Documentation

◆ areaHeight()

float visutwin::canvas::LightComponent::areaHeight ( ) const
inline

Definition at line 92 of file lightComponent.h.

◆ areaWidth()

float visutwin::canvas::LightComponent::areaWidth ( ) const
inline

Definition at line 90 of file lightComponent.h.

◆ cascadeBlend()

float visutwin::canvas::LightComponent::cascadeBlend ( ) const
inline

Definition at line 86 of file lightComponent.h.

◆ cascadeDistribution()

float visutwin::canvas::LightComponent::cascadeDistribution ( ) const
inline

Definition at line 83 of file lightComponent.h.

◆ castShadows()

bool visutwin::canvas::LightComponent::castShadows ( ) const
inline

Definition at line 62 of file lightComponent.h.

Referenced by setCastShadows().

◆ cloneFrom()

void visutwin::canvas::LightComponent::cloneFrom ( const Component * source)
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().

◆ color()

const Color & visutwin::canvas::LightComponent::color ( ) const
inline

Definition at line 38 of file lightComponent.h.

Referenced by setColor().

◆ direction()

Vector3 visutwin::canvas::LightComponent::direction ( ) const

◆ falloffMode()

LightFalloff visutwin::canvas::LightComponent::falloffMode ( ) const
inline

Definition at line 56 of file lightComponent.h.

◆ initializeComponentData()

void visutwin::canvas::LightComponent::initializeComponentData ( )
inlineoverridevirtual

Implements visutwin::canvas::Component.

Definition at line 31 of file lightComponent.h.

◆ innerConeAngle()

float visutwin::canvas::LightComponent::innerConeAngle ( ) const
inline

Definition at line 50 of file lightComponent.h.

◆ instances()

const std::vector< LightComponent * > & visutwin::canvas::LightComponent::instances ( )
inlinestatic

◆ intensity()

float visutwin::canvas::LightComponent::intensity ( ) const
inline

Definition at line 41 of file lightComponent.h.

Referenced by setIntensity().

◆ layers()

const std::vector< int > & visutwin::canvas::LightComponent::layers ( ) const
inline

Definition at line 99 of file lightComponent.h.

Referenced by setLayers().

◆ light()

Light * visutwin::canvas::LightComponent::light ( ) const

Definition at line 28 of file lightComponent.cpp.

◆ mask()

uint32_t visutwin::canvas::LightComponent::mask ( ) const
inline

Definition at line 59 of file lightComponent.h.

◆ numCascades()

int visutwin::canvas::LightComponent::numCascades ( ) const
inline

Definition at line 80 of file lightComponent.h.

◆ outerConeAngle()

float visutwin::canvas::LightComponent::outerConeAngle ( ) const
inline

Definition at line 53 of file lightComponent.h.

◆ position()

Vector3 visutwin::canvas::LightComponent::position ( ) const

Definition at line 114 of file lightComponent.cpp.

References visutwin::canvas::Component::_entity.

◆ range()

float visutwin::canvas::LightComponent::range ( ) const
inline

Definition at line 47 of file lightComponent.h.

Referenced by setRange().

◆ rendersLayer()

bool visutwin::canvas::LightComponent::rendersLayer ( const int layerId) const
inline

Definition at line 101 of file lightComponent.h.

◆ setAreaHeight()

void visutwin::canvas::LightComponent::setAreaHeight ( const float value)
inline

Definition at line 93 of file lightComponent.h.

◆ setAreaWidth()

void visutwin::canvas::LightComponent::setAreaWidth ( const float value)
inline

Definition at line 91 of file lightComponent.h.

◆ setCascadeBlend()

void visutwin::canvas::LightComponent::setCascadeBlend ( const float value)
inline

Definition at line 87 of file lightComponent.h.

◆ setCascadeDistribution()

void visutwin::canvas::LightComponent::setCascadeDistribution ( const float value)
inline

Definition at line 84 of file lightComponent.h.

◆ setCastShadows()

void visutwin::canvas::LightComponent::setCastShadows ( const bool castShadows)
inline

Definition at line 63 of file lightComponent.h.

References castShadows().

◆ setColor()

void visutwin::canvas::LightComponent::setColor ( const Color & color)
inline

Definition at line 39 of file lightComponent.h.

References color().

◆ setFalloffMode()

void visutwin::canvas::LightComponent::setFalloffMode ( const LightFalloff mode)
inline

Definition at line 57 of file lightComponent.h.

◆ setInnerConeAngle()

void visutwin::canvas::LightComponent::setInnerConeAngle ( const float angleDegrees)
inline

Definition at line 51 of file lightComponent.h.

◆ setIntensity()

void visutwin::canvas::LightComponent::setIntensity ( const float intensity)
inline

Definition at line 42 of file lightComponent.h.

References intensity().

◆ setLayers()

void visutwin::canvas::LightComponent::setLayers ( const std::vector< int > & layers)
inline

Definition at line 100 of file lightComponent.h.

References layers().

◆ setMask()

void visutwin::canvas::LightComponent::setMask ( const uint32_t value)
inline

Definition at line 60 of file lightComponent.h.

◆ setNumCascades()

void visutwin::canvas::LightComponent::setNumCascades ( const int value)
inline

Definition at line 81 of file lightComponent.h.

◆ setOuterConeAngle()

void visutwin::canvas::LightComponent::setOuterConeAngle ( const float angleDegrees)
inline

Definition at line 54 of file lightComponent.h.

◆ setRange()

void visutwin::canvas::LightComponent::setRange ( const float range)
inline

Definition at line 48 of file lightComponent.h.

References range().

◆ setShadowBias()

void visutwin::canvas::LightComponent::setShadowBias ( const float value)
inline

Definition at line 66 of file lightComponent.h.

◆ setShadowDistance()

void visutwin::canvas::LightComponent::setShadowDistance ( const float value)
inline

Definition at line 75 of file lightComponent.h.

◆ setShadowNormalBias()

void visutwin::canvas::LightComponent::setShadowNormalBias ( const float value)
inline

Definition at line 69 of file lightComponent.h.

◆ setShadowResolution()

void visutwin::canvas::LightComponent::setShadowResolution ( const int value)
inline

Definition at line 78 of file lightComponent.h.

◆ setShadowStrength()

void visutwin::canvas::LightComponent::setShadowStrength ( const float value)
inline

Definition at line 72 of file lightComponent.h.

◆ setType()

void visutwin::canvas::LightComponent::setType ( const LightType type)
inline

Definition at line 45 of file lightComponent.h.

References type().

◆ shadowBias()

float visutwin::canvas::LightComponent::shadowBias ( ) const
inline

Definition at line 65 of file lightComponent.h.

◆ shadowDistance()

float visutwin::canvas::LightComponent::shadowDistance ( ) const
inline

Definition at line 74 of file lightComponent.h.

◆ shadowNormalBias()

float visutwin::canvas::LightComponent::shadowNormalBias ( ) const
inline

Definition at line 68 of file lightComponent.h.

◆ shadowResolution()

int visutwin::canvas::LightComponent::shadowResolution ( ) const
inline

Definition at line 77 of file lightComponent.h.

◆ shadowStrength()

float visutwin::canvas::LightComponent::shadowStrength ( ) const
inline

Definition at line 71 of file lightComponent.h.

◆ type()

LightType visutwin::canvas::LightComponent::type ( ) const
inline

Definition at line 44 of file lightComponent.h.

Referenced by setType().


The documentation for this class was generated from the following files: