NAP
Public Attributes | List of all members
DirectionalLightComponent Class Reference

#include <directionallightcomponent.h>

Public Attributes

ComponentPtr< OrthoCameraComponentmShadowCamera
 Property: 'ShadowCamera' Camera that produces the depth texture for a directional light. More...
 
float mProjectionSize = 20.0f
 Property: 'ProjectionSize' The shadow camera scene projection size. More...
 
glm::vec2 mClippingPlanes = { 1.0f, 1000.0f }
 Property: 'ClippingPlanes' The near and far shadow clipping distance of this light. More...
 
uint mShadowMapSize = 1024
 Property: 'ShadowMapSize' The horizontal and vertical dimension of the shadow map for this light. More...
 
- Public Attributes inherited from LightComponent
bool mEnabled = true
 Property: 'Enabled' Whether the light is enabled. More...
 
bool mCastShadows = false
 Property: 'CastShadows' Enables shadows and creates shadow map resources for this light. More...
 
RGBColorFloat mColor = {1.0f, 1.0f, 1.0f}
 Property: 'Color' The light color. More...
 
float mIntensity = 1.0f
 Property: 'Intensity' The light intensity. More...
 
float mShadowStrength = 1.0f
 Property: 'ShadowStrength' The amount of light the shadow consumes. More...
 
Locator mLocator
 Property: 'Locator' Locator settings. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Public Member Functions inherited from LightComponent
virtual void getDependentComponents (std::vector< rtti::TypeInfo > &components) const override
 
- Public Member Functions inherited from Component
virtual const rtti::TypeInfo getInstanceType () const =0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 
- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Directional light component for NAP RenderAdvanced's light system.

Unidirectional light that emits from its origin to a specified direction. The Render Advanced service creates and manages a nap::DepthRenderTarget and nap::DepthRenderTexture2D for rendering this light's shadow maps.

Inheritance diagram for DirectionalLightComponent:
[legend]
Collaboration diagram for DirectionalLightComponent:
[legend]

Member Data Documentation

◆ mClippingPlanes

glm::vec2 mClippingPlanes = { 1.0f, 1000.0f }

Property: 'ClippingPlanes' The near and far shadow clipping distance of this light.

◆ mProjectionSize

float mProjectionSize = 20.0f

Property: 'ProjectionSize' The shadow camera scene projection size.

◆ mShadowCamera

Property: 'ShadowCamera' Camera that produces the depth texture for a directional light.

◆ mShadowMapSize

uint mShadowMapSize = 1024

Property: 'ShadowMapSize' The horizontal and vertical dimension of the shadow map for this light.