Skip to content

Commit 23fa502

Browse files
committed
Main: re-group shadow documentation in SceneManager
1 parent cb6a370 commit 23fa502

File tree

1 file changed

+60
-53
lines changed

1 file changed

+60
-53
lines changed

OgreMain/include/OgreSceneManager.h

+60-53
Original file line numberDiff line numberDiff line change
@@ -2524,7 +2524,7 @@ namespace Ogre {
25242524
void destroyQuery(SceneQuery* query);
25252525
/// @}
25262526

2527-
/// @name Shadow Setup
2527+
/// @name Generic Shadows Config
25282528
/// @{
25292529
/** Sets the general shadow technique to be used in this scene.
25302530
@@ -2563,11 +2563,6 @@ namespace Ogre {
25632563
/** Gets the current shadow technique. */
25642564
ShadowTechnique getShadowTechnique(void) const { return mShadowTechnique; }
25652565

2566-
/** Enables / disables the rendering of debug information for shadows. */
2567-
void setShowDebugShadows(bool debug) { mStencilShadowRenderer.mDebugShadows = debug; }
2568-
/** Are debug shadows shown? */
2569-
bool getShowDebugShadows(void ) const { return mStencilShadowRenderer.mDebugShadows; }
2570-
25712566
/** Set the colour used to modulate areas in shadow.
25722567
This is only applicable for shadow techniques which involve
25732568
darkening the area in shadow, as opposed to masking out the light.
@@ -2597,30 +2592,34 @@ namespace Ogre {
25972592
/** Gets the distance a shadow volume is extruded for a directional light.
25982593
*/
25992594
Real getShadowDirectionalLightExtrusionDistance(void) const;
2600-
/** Sets the default maximum distance away from the camera that shadows
2601-
will be visible. You have to call this function before you create lights
2602-
or the default distance of zero will be used.
26032595

2604-
Shadow techniques can be expensive, therefore it is a good idea
2605-
to limit them to being rendered close to the camera if possible,
2606-
and to skip the expense of rendering shadows for distance objects.
2607-
This method allows you to set the distance at which shadows will no
2608-
longer be rendered.
2609-
@note
2610-
Each shadow technique can interpret this subtely differently.
2611-
For example, one technique may use this to eliminate casters,
2612-
another might use it to attenuate the shadows themselves.
2613-
You should tweak this value to suit your chosen shadow technique
2614-
and scene setup.
2615-
*/
2616-
void setShadowFarDistance(Real distance);
2617-
/** Gets the default maximum distance away from the camera that shadows
2618-
will be visible.
2619-
*/
2620-
Real getShadowFarDistance(void) const
2621-
{ return mTextureShadowRenderer.mDefaultShadowFarDist; }
2622-
Real getShadowFarDistanceSquared(void) const
2623-
{ return mTextureShadowRenderer.mDefaultShadowFarDistSquared; }
2596+
/** Is there a stencil shadow based shadowing technique in use? */
2597+
bool isShadowTechniqueStencilBased(void) const
2598+
{ return (mShadowTechnique & SHADOWDETAILTYPE_STENCIL) != 0; }
2599+
/** Is there a texture shadow based shadowing technique in use? */
2600+
bool isShadowTechniqueTextureBased(void) const
2601+
{ return (mShadowTechnique & SHADOWDETAILTYPE_TEXTURE) != 0; }
2602+
/** Is there a modulative shadowing technique in use? */
2603+
bool isShadowTechniqueModulative(void) const
2604+
{ return (mShadowTechnique & SHADOWDETAILTYPE_MODULATIVE) != 0; }
2605+
/** Is there an additive shadowing technique in use? */
2606+
bool isShadowTechniqueAdditive(void) const
2607+
{ return (mShadowTechnique & SHADOWDETAILTYPE_ADDITIVE) != 0; }
2608+
/** Is the shadow technique integrated into primary materials? */
2609+
bool isShadowTechniqueIntegrated(void) const
2610+
{ return (mShadowTechnique & SHADOWDETAILTYPE_INTEGRATED) != 0; }
2611+
/** Is there any shadowing technique in use? */
2612+
bool isShadowTechniqueInUse(void) const
2613+
{ return mShadowTechnique != SHADOWTYPE_NONE; }
2614+
/// @}
2615+
2616+
/// @name Stencil Shadows Config
2617+
/// @{
2618+
2619+
/** Enables / disables the rendering of debug information for shadows. */
2620+
void setShowDebugShadows(bool debug) { mStencilShadowRenderer.mDebugShadows = debug; }
2621+
/** Are debug shadows shown? */
2622+
bool getShowDebugShadows(void ) const { return mStencilShadowRenderer.mDebugShadows; }
26242623

26252624
/** Sets the maximum size of the index buffer used to render shadow
26262625
primitives.
@@ -2650,11 +2649,6 @@ namespace Ogre {
26502649
void setShadowIndexBufferSize(size_t size);
26512650
/// Get the size of the shadow index buffer
26522651
size_t getShadowIndexBufferSize(void) const { return mStencilShadowRenderer.mShadowIndexBufferSize; }
2653-
/** Get the shadow camera setup in use for all lights which don't have
2654-
their own shadow camera setup.
2655-
@see ShadowCameraSetup
2656-
*/
2657-
const ShadowCameraSetupPtr& getShadowCameraSetup() const;
26582652

26592653
/** Sets whether we should use an infinite camera far plane
26602654
when rendering stencil shadows.
@@ -2695,24 +2689,6 @@ namespace Ogre {
26952689
void setShadowUseInfiniteFarPlane(bool enable) {
26962690
mStencilShadowRenderer.mShadowUseInfiniteFarPlane = enable; }
26972691

2698-
/** Is there a stencil shadow based shadowing technique in use? */
2699-
bool isShadowTechniqueStencilBased(void) const
2700-
{ return (mShadowTechnique & SHADOWDETAILTYPE_STENCIL) != 0; }
2701-
/** Is there a texture shadow based shadowing technique in use? */
2702-
bool isShadowTechniqueTextureBased(void) const
2703-
{ return (mShadowTechnique & SHADOWDETAILTYPE_TEXTURE) != 0; }
2704-
/** Is there a modulative shadowing technique in use? */
2705-
bool isShadowTechniqueModulative(void) const
2706-
{ return (mShadowTechnique & SHADOWDETAILTYPE_MODULATIVE) != 0; }
2707-
/** Is there an additive shadowing technique in use? */
2708-
bool isShadowTechniqueAdditive(void) const
2709-
{ return (mShadowTechnique & SHADOWDETAILTYPE_ADDITIVE) != 0; }
2710-
/** Is the shadow technique integrated into primary materials? */
2711-
bool isShadowTechniqueIntegrated(void) const
2712-
{ return (mShadowTechnique & SHADOWDETAILTYPE_INTEGRATED) != 0; }
2713-
/** Is there any shadowing technique in use? */
2714-
bool isShadowTechniqueInUse(void) const
2715-
{ return mShadowTechnique != SHADOWTYPE_NONE; }
27162692
/** Sets whether when using a built-in additive shadow mode, user clip
27172693
planes should be used to restrict light rendering.
27182694
*/
@@ -2723,9 +2699,34 @@ namespace Ogre {
27232699
bool getShadowUseLightClipPlanes() const { return mStencilShadowRenderer.mShadowAdditiveLightClip; }
27242700
/// @}
27252701

2726-
/// @name Shadow Texture Config
2702+
/// @name Texture Shadows Config
27272703
/// @{
27282704

2705+
/** Sets the default maximum distance away from the camera that shadows
2706+
will be visible. You have to call this function before you create lights
2707+
or the default distance of zero will be used.
2708+
2709+
Shadow techniques can be expensive, therefore it is a good idea
2710+
to limit them to being rendered close to the camera if possible,
2711+
and to skip the expense of rendering shadows for distance objects.
2712+
This method allows you to set the distance at which shadows will no
2713+
longer be rendered.
2714+
@note
2715+
Each shadow technique can interpret this subtely differently.
2716+
For example, one technique may use this to eliminate casters,
2717+
another might use it to attenuate the shadows themselves.
2718+
You should tweak this value to suit your chosen shadow technique
2719+
and scene setup.
2720+
*/
2721+
void setShadowFarDistance(Real distance);
2722+
/** Gets the default maximum distance away from the camera that shadows
2723+
will be visible.
2724+
*/
2725+
Real getShadowFarDistance(void) const
2726+
{ return mTextureShadowRenderer.mDefaultShadowFarDist; }
2727+
Real getShadowFarDistanceSquared(void) const
2728+
{ return mTextureShadowRenderer.mDefaultShadowFarDistSquared; }
2729+
27292730
/// Method for preparing shadow textures ready for use in a regular render
27302731
/// Do not call manually unless before frame start or rendering is paused
27312732
/// If lightList is not supplied, will render all lights in frustum
@@ -2967,6 +2968,12 @@ namespace Ogre {
29672968
@see ShadowCameraSetup
29682969
*/
29692970
void setShadowCameraSetup(const ShadowCameraSetupPtr& shadowSetup);
2971+
2972+
/** Get the shadow camera setup in use for all lights which don't have
2973+
their own shadow camera setup.
2974+
@see ShadowCameraSetup
2975+
*/
2976+
const ShadowCameraSetupPtr& getShadowCameraSetup() const;
29702977
/// @}
29712978

29722979
/** Sets the active compositor chain of the current scene being rendered.

0 commit comments

Comments
 (0)