#include <pointlightcomponent.h>
Public Member Functions | |
PointLightComponentInstance (EntityInstance &entity, Component &resource) | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual ELightType | getLightType () const override |
virtual EShadowMapType | getShadowMapType () const override |
float | getAttenuation () const |
void | setAttenuation (float attenuation) |
![]() | |
LightComponentInstance (EntityInstance &entity, Component &resource) | |
virtual | ~LightComponentInstance () |
virtual void | onDestroy () override |
virtual void | enable (bool enable) |
bool | isEnabled () const |
bool | canCastShadows () const |
bool | castsShadows () const |
virtual uint | getShadowMapSize () const |
virtual float | getIntensity () const |
void | setIntensity (float intensity) |
virtual float | getShadowStrength () const |
virtual void | setShadowStrength (float strength) |
virtual float | getShadowSpread () const |
virtual void | setShadowSpread (float spread) |
virtual const RGBColorFloat & | getColor () const |
void | setColor (const RGBColorFloat &color) |
const glm::vec3 | getLightPosition () const |
const glm::vec3 | getLightDirection () const |
const TransformComponentInstance & | getTransform () const |
TransformComponentInstance & | getTransform () |
bool | hasCamera () const |
CameraComponentInstance & | getCamera () const |
CameraComponentInstance & | getCamera () |
const RenderGnomonComponentInstance & | getGnomon () const |
RenderGnomonComponentInstance & | getGnomon () |
const RenderFrustumComponentInstance * | getFrustrum () const |
RenderFrustumComponentInstance * | getFrustrum () |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
virtual void | update (double deltaTime) |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
virtual bool | init (utility::ErrorState &errorState) |
![]() | |
Object () | |
virtual | ~Object () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
float | mAttenuation = 0.1f |
![]() | |
float | mIntensity = 1.0f |
RGBColorFloat | mColor = { 1.0f, 1.0f, 1.0f } |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
void | registerUniformLightProperty (const std::string &memberName) |
SpawnedEntityInstance | spawnShadowCamera (const nap::Entity &entity, nap::utility::ErrorState &error) |
![]() | |
LightComponent * | mResource = nullptr |
TransformComponentInstance * | mTransform = nullptr |
RenderAdvancedService * | mService = nullptr |
SpawnedEntityInstance | mSpawnedCamera |
bool | mIsEnabled = true |
bool | mIsShadowEnabled = false |
float | mShadowStrength = 1.0f |
float | mShadowSpread = 2.0f |
uint | mShadowMapSize = 512 |
Point light component instance for NAP RenderAdvanced's light system.
Omnidirectional light that emits from its origin. Therefore, ignores the direction
uniform. The Render Advanced service creates and manages a nap::CubeDepthRenderTarget
and nap::DepthRenderTextureCube
for rendering this light's shadow maps.
PointLightComponentInstance | ( | EntityInstance & | entity, |
Component & | resource | ||
) |
float getAttenuation | ( | ) | const |
The rate at which light intensity is lost over distance from the origin
|
overridevirtual |
Implements LightComponentInstance.
|
overridevirtual |
Implements LightComponentInstance.
|
overridevirtual |
Initialize LightComponentInstance based on the LightComponent resource
errorState | should hold the error message when initialization fails |
Reimplemented from LightComponentInstance.
void setAttenuation | ( | float | attenuation | ) |
Set the rate at which light intensity is lost over distance from the origin
attenuation | light attenuation |
float mAttenuation = 0.1f |