sgLightManager Class Reference#include <sgLightManager.h>
Inheritance diagram for sgLightManager:
[legend]List of all members.
|
Public Types |
| lpqtProduction = 0 |
| lpqtDesign = 1 |
| lpqtDraft = 2 |
| sgReceiveSunLightProp |
| sgAdaptiveSelfIlluminationProp |
| sgCustomAmbientLightingProp |
| sgCustomAmbientForSelfIlluminationProp |
| sgPropertyCount |
enum | lightingProfileQualityType {
lpqtProduction = 0,
lpqtDesign = 1,
lpqtDraft = 2
} |
enum | sgLightingPropertiesEnum {
sgReceiveSunLightProp,
sgAdaptiveSelfIlluminationProp,
sgCustomAmbientLightingProp,
sgCustomAmbientForSelfIlluminationProp,
sgPropertyCount
} |
Public Member Functions |
| sgLightManager () |
virtual | ~sgLightManager () |
AvailableSLInterfaces * | getLightingInterfaces () |
virtual void | activate () |
virtual void | deactivate () |
virtual const char * | getId () const |
virtual AvailableSLInterfaces * | getSceneLightingInterface () |
virtual LightInfo * | createLightInfo () |
virtual LightInfo * | getDefaultLight () |
sgLightInfo * | createSGLightInfo () |
void | registerGlobalLight (LightInfo *light, SimObject *obj, bool zonealreadyset) |
void | unregisterGlobalLight (LightInfo *light) |
void | registerLocalLight (LightInfo *light) |
void | unregisterLocalLight (LightInfo *light) |
void | registerGlobalLights (bool staticlighting) |
void | unregisterAllLights () |
void | getAllUnsortedLights (LightInfoList &list) |
| Returns all unsorted and un-scored lights (both global and local).
|
void | getBestLights (LightInfoList &list) |
| Copies the best lights list - this DOESN'T find the lights! Call setupLights to populate the list.
|
void | sgBuildDualLightLists (const LightInfoList &list, LightInfoDualList &listdual) |
| Accepts a pre-filtered list instead of using the best lights list so interiors can filter lights against zones and then build the the dual list.
|
void | setupLights (SceneObject *obj) |
| For DST objects.
|
void | setupLights (SceneObject *obj, const Point3F &camerapos, const Point3F &cameradir, F32 viewdist, S32 maxlights) |
| For the terrain and Atlas.
|
void | setupLights (SceneObject *obj, const Box3F &box, S32 maxlights) |
| Finds the best lights that overlap with the bounding box based on the box center.
|
void | resetLights () |
| Reset the best lights list and all associated data.
|
virtual void | setLightInfo (ProcessedMaterial *pmat, const Material *mat, const SceneGraphData &sgData, U32 pass, GFXShaderConstBuffer *shaderConsts) |
| Sets shader constants / textures for light infos.
|
virtual bool | initTextureStateBlock (const U32 currTexFlag, const U32 textureSlot, GFXStateBlockDesc *stateblock) |
| Allows us to setup texture states, return true if we've done work.
|
virtual bool | setTextureStage (const SceneGraphData &sgData, const U32 currTexFlag, const U32 textureSlot, GFXShaderConstBuffer *shaderConsts, ShaderConstHandles *handles) |
| Allows us to set textures during the Material::setTextureStage call.
|
virtual sgMatInstance * | getDynamicLightingMaterial (BaseMatInstance *root, sgLightInfo *light, bool tryfordual) |
| Gets the dynamic lighting material for root+light combo.
|
virtual bool | lightScene (const char *callback, const char *param) |
LightInfo * | sgGetDefaultLight () |
LightInfo * | getSpecialLight (SpecialLightTypesEnum type) |
void | setSpecialLight (SpecialLightTypesEnum type, LightInfo *light) |
void | sgSetupZoneLighting (bool enable, SimObject *sobj) |
virtual void | hdrPrepare (const Point2I &offset, const Point2I &extent) |
virtual void | hdrRender () |
Static Public Member Functions |
static sgLightManager * | get () |
static void | cleanup () |
template<class T> |
static void | sgSafeSet (GFXShaderConstBuffer *shaderConsts, const String &name, T value) |
static bool | sgGetProperty (U32 prop) |
static void | sgSetProperty (U32 prop, bool val) |
static bool | sgAllowDiffuseCustomAmbient () |
static bool | sgAllowAdaptiveSelfIllumination () |
static bool | sgAllowCollectSelfIlluminationColor () |
static bool | sgAllowReceiveSunLight () |
static bool | sgAllowDynamicShadows () |
static U32 | sgGetDynamicShadowQuality () |
static bool | sgAllowDynamicLightingDualOptimization () |
static bool | sgAllowDRLSystem () |
static bool | sgAllowFullDynamicRangeLighting () |
static bool | sgAllowFullHighDynamicRangeLighting () |
static bool | sgAllowBloom () |
static bool | sgAllowToneMapping () |
static ColorF | sgGetSelfIlluminationColor (ColorF defaultcol) |
static void | sgSetAllowDynamicRangeLighting (bool enable) |
static void | sgSetAllowHighDynamicRangeLighting (bool enable) |
static void | sgSetAllowDRLBloom (bool enable) |
static void | sgSetAllowDRLToneMapping (bool enable) |
static void | sgInit () |
static bool | sgAllowShadows () |
static bool | sgAllowFullLightMaps () |
static U32 | sgGetLightMapScale () |
static void | sgGetFilteredLightColor (ColorF &color, ColorF &ambient, S32 objectzone) |
Public Attributes |
Signal< void(bool)> | mSgActivate |
sgDRLSystem | drlSystem |
Static Public Attributes |
static U32 | sgDynamicShadowDetailSize |
static bool | sgMultipleDynamicShadows |
static bool | sgShowCacheStats |
static F32 | sgDRLTarget |
static F32 | sgDRLMax |
static F32 | sgDRLMin |
static F32 | sgDRLMultiplier |
static F32 | sgBloomCutOff |
static F32 | sgBloomAmount |
static F32 | sgBloomSeedAmount |
static U32 | sgAtlasMaxDynamicLights |
Private Types |
typedef LightManager | Parent |
Private Member Functions |
void | sgFindBestLights (const Box3F &box, S32 maxlights, const Point3F &viewdir, bool camerabased) |
void | sgScoreLight (sgLightInfo *light, const Box3F &box, const SphereF &sphere, bool camerabased) |
bool | getLightingAmbientColor (SceneObject *obj, ColorF *col, sgLightInfo **light) |
Static Private Member Functions |
static S32 QSORT_CALLBACK | sgSortLightsByAddress (const void *, const void *) |
static S32 QSORT_CALLBACK | sgSortLightsByScore (const void *, const void *) |
Private Attributes |
SceneLighting * | mSceneLighting |
AvailableSLInterfaces * | mLightingInterfaces |
sgLightInfo * | sgSpecialLights [slSpecialLightTypesCount] |
sgLightInfo * | sgTranslatedSun |
LightInfoList | sgRegisteredGlobalLights |
LightInfoList | sgRegisteredLocalLights |
LightInfoList | sgBestLights |
Static Private Attributes |
static sgLightManager * | smsgLightManagerSingleton |
static bool | sgLightingProperties [sgPropertyCount] |
static U32 | sgLightingProfileQuality |
static bool | sgLightingProfileAllowShadows |
static LightInfo * | sgDefaultLight |
static bool | sgUseDynamicShadows |
static U32 | sgDynamicShadowQuality |
static bool | sgUseDynamicLightingDualOptimization |
static bool | sgUseSelfIlluminationColor |
static ColorF | sgSelfIlluminationColor |
static bool | sgFilterZones |
static S32 | sgZones [2] |
static S32 | sgMaxBestLights |
static bool | sgInGUIEditor |
static bool | sgUseDynamicRangeLighting |
static bool | sgUseDRLHighDynamicRange |
static bool | sgAllowDynamicRangeLighting |
static bool | sgAllowDRLHighDynamicRange |
static bool | sgAllowDRLBloom |
static bool | sgAllowDRLToneMapping |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
lpqtProduction |
|
lpqtDesign |
|
lpqtDraft |
|
- Enumerator:
-
sgReceiveSunLightProp |
|
sgAdaptiveSelfIlluminationProp |
|
sgCustomAmbientLightingProp |
|
sgCustomAmbientForSelfIlluminationProp |
|
sgPropertyCount |
|
Constructor & Destructor Documentation
sgLightManager::sgLightManager |
( |
|
) |
|
virtual sgLightManager::~sgLightManager |
( |
|
) |
[virtual] |
Member Function Documentation
static void sgLightManager::cleanup |
( |
|
) |
[inline, static] |
virtual void sgLightManager::activate |
( |
|
) |
[virtual] |
virtual void sgLightManager::deactivate |
( |
|
) |
[virtual] |
virtual const char* sgLightManager::getId |
( |
|
) |
const [virtual] |
virtual LightInfo* sgLightManager::createLightInfo |
( |
|
) |
[virtual] |
virtual LightInfo* sgLightManager::getDefaultLight |
( |
|
) |
[virtual] |
void sgLightManager::unregisterGlobalLight |
( |
LightInfo * |
light |
) |
[inline, virtual] |
void sgLightManager::registerLocalLight |
( |
LightInfo * |
light |
) |
[inline, virtual] |
void sgLightManager::unregisterLocalLight |
( |
LightInfo * |
light |
) |
[inline, virtual] |
void sgLightManager::registerGlobalLights |
( |
bool |
staticlighting |
) |
[virtual] |
void sgLightManager::unregisterAllLights |
( |
|
) |
[virtual] |
Returns all unsorted and un-scored lights (both global and local).
Implements LightManager.
Copies the best lights list - this DOESN'T find the lights! Call setupLights to populate the list.
Implements LightManager.
Accepts a pre-filtered list instead of using the best lights list so interiors can filter lights against zones and then build the the dual list.
..
For DST objects.
Finds the best lights including a composite based on the environmental ambient lighting amount *and installs them in OpenGL*.
Implements LightManager.
For the terrain and Atlas.
Finds the best lights in the viewing area based on distance to camera.
Implements LightManager.
Finds the best lights that overlap with the bounding box based on the box center.
Implements LightManager.
void sgLightManager::resetLights |
( |
|
) |
[virtual] |
Reset the best lights list and all associated data.
Implements LightManager.
Sets shader constants / textures for light infos.
Implements LightManager.
virtual bool sgLightManager::initTextureStateBlock |
( |
const U32 |
currTexFlag, |
|
|
const U32 |
textureSlot, |
|
|
GFXStateBlockDesc * |
stateblock | |
|
) |
| | [virtual] |
Allows us to setup texture states, return true if we've done work.
Implements LightManager.
Allows us to set textures during the Material::setTextureStage call.
Implements LightManager.
Gets the dynamic lighting material for root+light combo.
virtual bool sgLightManager::lightScene |
( |
const char * |
callback, |
|
|
const char * |
param | |
|
) |
| | [virtual] |
LightInfo* sgLightManager::sgGetDefaultLight |
( |
|
) |
[inline] |
void sgLightManager::sgFindBestLights |
( |
const Box3F & |
box, |
|
|
S32 |
maxlights, |
|
|
const Point3F & |
viewdir, |
|
|
bool |
camerabased | |
|
) |
| | [private] |
static bool sgLightManager::sgGetProperty |
( |
U32 |
prop |
) |
[inline, static] |
static void sgLightManager::sgSetProperty |
( |
U32 |
prop, |
|
|
bool |
val | |
|
) |
| | [inline, static] |
static bool sgLightManager::sgAllowDiffuseCustomAmbient |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowAdaptiveSelfIllumination |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowCollectSelfIlluminationColor |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowReceiveSunLight |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowDynamicShadows |
( |
|
) |
[inline, static] |
static U32 sgLightManager::sgGetDynamicShadowQuality |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowDynamicLightingDualOptimization |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowDRLSystem |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowFullDynamicRangeLighting |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowFullHighDynamicRangeLighting |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowBloom |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowToneMapping |
( |
|
) |
[inline, static] |
static ColorF sgLightManager::sgGetSelfIlluminationColor |
( |
ColorF |
defaultcol |
) |
[inline, static] |
static void sgLightManager::sgSetAllowDynamicRangeLighting |
( |
bool |
enable |
) |
[inline, static] |
static void sgLightManager::sgSetAllowHighDynamicRangeLighting |
( |
bool |
enable |
) |
[inline, static] |
static void sgLightManager::sgSetAllowDRLBloom |
( |
bool |
enable |
) |
[inline, static] |
static void sgLightManager::sgSetAllowDRLToneMapping |
( |
bool |
enable |
) |
[inline, static] |
static void sgLightManager::sgInit |
( |
|
) |
[static] |
static bool sgLightManager::sgAllowShadows |
( |
|
) |
[inline, static] |
static bool sgLightManager::sgAllowFullLightMaps |
( |
|
) |
[inline, static] |
static U32 sgLightManager::sgGetLightMapScale |
( |
|
) |
[inline, static] |
static void sgLightManager::sgGetFilteredLightColor |
( |
ColorF & |
color, |
|
|
ColorF & |
ambient, |
|
|
S32 |
objectzone | |
|
) |
| | [static] |
virtual void sgLightManager::hdrPrepare |
( |
const Point2I & |
offset, |
|
|
const Point2I & |
extent | |
|
) |
| | [inline, virtual] |
virtual void sgLightManager::hdrRender |
( |
|
) |
[inline, virtual] |
static S32 QSORT_CALLBACK sgLightManager::sgSortLightsByAddress |
( |
const void * |
, |
|
|
const void * |
| |
|
) |
| | [static, private] |
static S32 QSORT_CALLBACK sgLightManager::sgSortLightsByScore |
( |
const void * |
, |
|
|
const void * |
| |
|
) |
| | [static, private] |
Member Data Documentation
|