LightManager Class Reference#include <sgLightManager.h>
|
Public Types |
enum | sgSpecialLightTypesEnum {
sgSunLightType,
sgSpecialLightTypesCount
} |
enum | lightingProfileQualityType {
lpqtProduction = 0,
lpqtDesign = 1,
lpqtDraft = 2
} |
enum | dynamicLightingQualityType {
dlqtSevenSample = 0,
dlqtFourSample = 1,
dlqtCenterSample = 2,
dlqtNoShadows = 3
} |
enum | sgLightingPropertiesEnum {
sgReceiveSunLightProp,
sgAdaptiveSelfIlluminationProp,
sgCustomAmbientLightingProp,
sgCustomAmbientForSelfIlluminationProp,
sgPropertyCount
} |
Public Member Functions |
| LightManager () |
void | sgRegisterGlobalLight (LightInfo *light) |
void | sgUnregisterGlobalLight (LightInfo *light) |
void | sgRegisterLocalLight (LightInfo *light) |
void | sgUnregisterLocalLight (LightInfo *light) |
void | sgRegisterGlobalLights (bool staticlighting) |
void | sgUnregisterAllLights () |
void | sgGetAllUnsortedLights (LightInfoList &list) |
| Returns all unsorted and un-scored lights (both global and local).
|
void | sgGetBestLights (LightInfoList &list) |
| Copies the best lights list - this DOESN'T find the lights! Call sgSetupLights to populate the list.
|
void | sgSetupLights (SceneObject *obj) |
| For DST objects.
|
void | sgSetupLights (SceneObject *obj, const Point3F &camerapos, const Point3F &cameradir, F32 viewdist, S32 maxlights) |
| For the terrain and Atlas.
|
void | sgSetupLights (SceneObject *obj, const Box3F &box, S32 maxlights) |
| Finds the best lights that overlap with the bounding box based on the box center.
|
void | sgFilterLights (bool allowstatics, bool allowdynamics) |
void | sgInstallLights () |
| Add the top 8 best lights to OpenGL.
|
void | sgResetLights () |
| Reset the best lights list and all associated data.
|
LightInfo * | sgGetSpecialLight (sgSpecialLightTypesEnum type) |
void | sgSetSpecialLight (sgSpecialLightTypesEnum type, LightInfo *light) |
void | sgClearSpecialLights () |
Static Public Member Functions |
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 S32 | sgGetMaxBestLights () |
static bool | sgAllowDynamicShadows () |
static U32 | sgGetDynamicShadowQuality () |
static void | sgSetDynamicShadowQuality (U32 quality) |
static bool | sgAllowDynamicParticleSystemLighting () |
static bool | sgAllowBlendedTerrainDynamicLighting () |
static ColorF | sgGetSelfIlluminationColor (ColorF defaultcol) |
static void | sgInit () |
static bool | sgAllowDetailMaps () |
static bool | sgAllowShadows () |
static bool | sgAllowFullLightMaps () |
static U32 | sgGetLightMapScale () |
static void | sgGetFilteredLightColor (ColorF &color, ColorF &ambient, S32 objectzone) |
static void | sgSetupZoneLighting (bool enable, SimObject *sobj) |
static void | sgSetupExposureRendering () |
static void | sgResetExposureRendering () |
static void | sgSetAmbientSelfIllumination (LightInfo *lightinfo, F32 *lightColor, F32 *ambientColor) |
Static Public Attributes |
static bool | sgMultipleDynamicShadows |
Private Member Functions |
void | sgFindBestLights (SceneObject *obj, const Box3F &box, S32 maxlights, const Point3F &viewdir, bool camerabased) |
void | sgScoreLight (LightInfo *light, SceneObject *obj, const Box3F &box, const SphereF &sphere, bool camerabased) |
Static Private Member Functions |
static S32 QSORT_CALLBACK | sgSortLightsByAddress (const void *, const void *) |
static S32 QSORT_CALLBACK | sgSortLightsByScore (const void *, const void *) |
Private Attributes |
LightInfo * | sgSpecialLights [sgSpecialLightTypesCount] |
LightInfoList | sgRegisteredGlobalLights |
LightInfoList | sgRegisteredLocalLights |
LightInfoList | sgBestLights |
Static Private Attributes |
static bool | sgLightingProperties [sgPropertyCount] |
static U32 | sgLightingProfileQuality |
static bool | sgLightingProfileAllowShadows |
static LightInfo | sgDefaultLight |
static bool | sgDetailMaps |
static U32 | sgDynamicLightingOcclusionQuality |
static bool | sgUseDynamicShadows |
static U32 | sgDynamicShadowQuality |
static bool | sgUseSelfIlluminationColor |
static ColorF | sgSelfIlluminationColor |
static bool | sgDynamicParticleSystemLighting |
static bool | sgBlendedTerrainDynamicLighting |
static bool | sgFilterZones |
static S32 | sgZones [2] |
static S32 | sgMaxBestLights |
static bool | sgInGUIEditor |
Member Enumeration Documentation
- Enumerator:
-
sgSunLightType |
|
sgSpecialLightTypesCount |
|
- Enumerator:
-
lpqtProduction |
|
lpqtDesign |
|
lpqtDraft |
|
- Enumerator:
-
dlqtSevenSample |
|
dlqtFourSample |
|
dlqtCenterSample |
|
dlqtNoShadows |
|
- Enumerator:
-
sgReceiveSunLightProp |
|
sgAdaptiveSelfIlluminationProp |
|
sgCustomAmbientLightingProp |
|
sgCustomAmbientForSelfIlluminationProp |
|
sgPropertyCount |
|
Constructor & Destructor Documentation
LightManager::LightManager |
( |
|
) |
[inline] |
Member Function Documentation
void LightManager::sgUnregisterGlobalLight |
( |
LightInfo * |
light |
) |
[inline] |
void LightManager::sgRegisterLocalLight |
( |
LightInfo * |
light |
) |
[inline] |
void LightManager::sgUnregisterLocalLight |
( |
LightInfo * |
light |
) |
[inline] |
void LightManager::sgRegisterGlobalLights |
( |
bool |
staticlighting |
) |
|
void LightManager::sgUnregisterAllLights |
( |
|
) |
|
Returns all unsorted and un-scored lights (both global and local).
Copies the best lights list - this DOESN'T find the lights! Call sgSetupLights to populate the list.
For DST objects.
Finds the best lights including a composite based on the environmental ambient lighting amount *and installs them in OpenGL*.
For the terrain and Atlas.
Finds the best lights in the viewing area based on distance to camera.
Finds the best lights that overlap with the bounding box based on the box center.
void LightManager::sgFilterLights |
( |
bool |
allowstatics, |
|
|
bool |
allowdynamics | |
|
) |
| | |
void LightManager::sgInstallLights |
( |
|
) |
|
Add the top 8 best lights to OpenGL.
void LightManager::sgResetLights |
( |
|
) |
|
Reset the best lights list and all associated data.
void LightManager::sgClearSpecialLights |
( |
|
) |
|
static bool LightManager::sgGetProperty |
( |
U32 |
prop |
) |
[inline, static] |
static void LightManager::sgSetProperty |
( |
U32 |
prop, |
|
|
bool |
val | |
|
) |
| | [inline, static] |
static bool LightManager::sgAllowDiffuseCustomAmbient |
( |
|
) |
[inline, static] |
static bool LightManager::sgAllowAdaptiveSelfIllumination |
( |
|
) |
[inline, static] |
static bool LightManager::sgAllowCollectSelfIlluminationColor |
( |
|
) |
[inline, static] |
static bool LightManager::sgAllowReceiveSunLight |
( |
|
) |
[inline, static] |
static S32 LightManager::sgGetMaxBestLights |
( |
|
) |
[inline, static] |
static bool LightManager::sgAllowDynamicShadows |
( |
|
) |
[inline, static] |
static U32 LightManager::sgGetDynamicShadowQuality |
( |
|
) |
[inline, static] |
static void LightManager::sgSetDynamicShadowQuality |
( |
U32 |
quality |
) |
[inline, static] |
static bool LightManager::sgAllowDynamicParticleSystemLighting |
( |
|
) |
[inline, static] |
static bool LightManager::sgAllowBlendedTerrainDynamicLighting |
( |
|
) |
[static] |
static ColorF LightManager::sgGetSelfIlluminationColor |
( |
ColorF |
defaultcol |
) |
[inline, static] |
static void LightManager::sgInit |
( |
|
) |
[static] |
static bool LightManager::sgAllowDetailMaps |
( |
|
) |
[static] |
static bool LightManager::sgAllowShadows |
( |
|
) |
[inline, static] |
static bool LightManager::sgAllowFullLightMaps |
( |
|
) |
[inline, static] |
static U32 LightManager::sgGetLightMapScale |
( |
|
) |
[inline, static] |
static void LightManager::sgGetFilteredLightColor |
( |
ColorF & |
color, |
|
|
ColorF & |
ambient, |
|
|
S32 |
objectzone | |
|
) |
| | [static] |
static void LightManager::sgSetupZoneLighting |
( |
bool |
enable, |
|
|
SimObject * |
sobj | |
|
) |
| | [static] |
static void LightManager::sgSetupExposureRendering |
( |
|
) |
[static] |
static void LightManager::sgResetExposureRendering |
( |
|
) |
[static] |
static void LightManager::sgSetAmbientSelfIllumination |
( |
LightInfo * |
lightinfo, |
|
|
F32 * |
lightColor, |
|
|
F32 * |
ambientColor | |
|
) |
| | [static] |
static S32 QSORT_CALLBACK LightManager::sgSortLightsByAddress |
( |
const void * |
, |
|
|
const void * |
| |
|
) |
| | [static, private] |
static S32 QSORT_CALLBACK LightManager::sgSortLightsByScore |
( |
const void * |
, |
|
|
const void * |
| |
|
) |
| | [static, private] |
Field Documentation
|