Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CIndirectLighting Class Reference

This object holds the parameters for indirect lighting like SH or AmbientColor or Lightmap. More...

#include <IndirectLighting/CIndirectLighting.h>

Inheritance diagram for Skylicht::CIndirectLighting:
Skylicht::CComponentSystem Skylicht::IActivatorObject

Public Types

enum  EIndirectType { LightmapArray = 0 , VertexColor , SH9 , AmbientColor }

Public Member Functions

virtual void initComponent ()
virtual void startComponent ()
virtual void updateComponent ()
virtual CObjectSerializablecreateSerializable ()
virtual void loadSerializable (CObjectSerializable *object)
void setLightLayers (u32 layers)
void setAutoSH (bool b)
void setIndirectLightingType (EIndirectType type, bool loadLightmap=true)
void setIndirectLightmap (ITexture *texture)
ITexture * getIndirectLightmap ()
void setSH (core::vector3df *sh)
void setAmbientColor (const SColor &color)
void setCustomIntensity (float intensity)
EIndirectType getIndirectLightingType ()
std::vector< CIndirectLightingData * > & getData ()
bool isLightmapEmpty ()
bool isLightmapChanged (const std::vector< std::string > &paths)
void removeAllData ()
Public Member Functions inherited from Skylicht::CComponentSystem
const char * getName ()
virtual void reset ()
virtual void endUpdate ()
virtual void onEnable (bool b)
virtual void onUpdateCullingLayer (u32 mask)
void setEnable (bool b)
bool isEnable ()
CGameObject * getGameObject ()
void setEnableSerializable (bool b)
bool isSerializable ()
void addLinkComponent (CComponentSystem *comp)
void removeAllLink ()
Public Member Functions inherited from Skylicht::IActivatorObject
virtual ~IActivatorObject ()
 Virtual destructor for polymorphic activator objects.

Protected Member Functions

void addLightingData (CEntity *entity)
Protected Member Functions inherited from Skylicht::CComponentSystem
void setOwner (CGameObject *obj)

Protected Attributes

EIndirectType m_type
bool m_autoSH
std::vector< CIndirectLightingData * > m_data
core::vector3df m_sh [9]
float m_intensity
float m_customIntensity
std::vector< std::string > m_indirectLMPaths
ITexture * m_indirectLM
bool m_internalIndirectLM
SColor m_ambientColor
u32 m_lightLayers
Protected Attributes inherited from Skylicht::CComponentSystem
CGameObject * m_gameObject
bool m_enable
bool m_serializable
std::vector< CComponentSystem * > m_linkComponent

Additional Inherited Members

Static Public Member Functions inherited from Skylicht::CComponentSystem
static int useComponent (CComponentSystem *used)

Detailed Description

This object holds the parameters for indirect lighting like SH or AmbientColor or Lightmap.

The component stores parameters related to indirect light.

The default type is Spherical Harmonics (SH). The SH values are taken from the nearest Light Probe.

However, you can change the indirect lighting to a Ambient Color or a Lightmap Texture that has been baked using a Lightmapper.

The capsule shape on the left uses SH illumination, and the one on the right uses Ambient Color
See also
CLightProbes

Member Function Documentation

◆ createSerializable()

virtual CObjectSerializable * Skylicht::CIndirectLighting::createSerializable ( )
virtual

Reimplemented from Skylicht::CComponentSystem.

◆ initComponent()

virtual void Skylicht::CIndirectLighting::initComponent ( )
virtual

◆ loadSerializable()

virtual void Skylicht::CIndirectLighting::loadSerializable ( CObjectSerializable * object)
virtual

Reimplemented from Skylicht::CComponentSystem.

◆ startComponent()

virtual void Skylicht::CIndirectLighting::startComponent ( )
virtual

Reimplemented from Skylicht::CComponentSystem.

◆ updateComponent()

virtual void Skylicht::CIndirectLighting::updateComponent ( )
virtual

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