OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreCompositorShadowNode.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __CompositorShadowNode_H__
30 #define __CompositorShadowNode_H__
31 
32 #include "OgreHeaderPrefix.h"
33 
36 #include "OgreShadowCameraSetup.h"
37 
38 namespace Ogre
39 {
113  {
115 
117  {
123  };
124 
128 
130  size_t mLastFrame;
132 
139 
142 
145 
153  void buildClosestLightList(Camera *newCamera , const Camera *lodCamera);
154 
155  CompositorChannel createShadowTexture( const ShadowTextureDefinition &textureDef,
156  const RenderTarget *finalTarget );
157 
158  public:
159  CompositorShadowNode( IdType id, const CompositorShadowNodeDef *definition,
160  CompositorWorkspace *workspace, RenderSystem *renderSys,
161  const RenderTarget *finalTarget );
163 
168  void _update(Camera* camera, const Camera *lodCamera, SceneManager *sceneManager);
169 
171  virtual void postInitializePassScene( CompositorPassScene *pass );
172 
173  const LightList* setShadowMapsToPass( Renderable* rend, const Pass* pass,
174  AutoParamDataSource *autoParamDataSource,
175  size_t startLight );
176 
178  const AxisAlignedBox& getCastersBox(void) const { return mCastersBox; }
179 
184  void getMinMaxDepthRange( const Frustum *shadowMapCamera, Real &outMin, Real &outMax ) const;
185 
196  const vector<Real>::type* getPssmSplits( size_t shadowMapIdx ) const;
197 
202  size_t getNumShadowCastingLights(void) const { return mShadowMapCastingLights.size(); }
203  const LightClosestArray& getShadowCastingLights(void) const { return mShadowMapCastingLights; }
204 
206  virtual void finalTargetResized( const RenderTarget *finalTarget );
207  };
208 
211 }
212 
213 #include "OgreHeaderSuffix.h"
214 
215 #endif
A 'canvas' which can receive the results of a rendering operation.
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:82
float Real
Software floating point type.
#define _OgreExport
Definition: OgrePlatform.h:255
A compositor workspace is the main interface to render into an RT, be it a RenderWindow or an RTT (Re...
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Definition: OgreFrustum.h:84
Manages the organisation and rendering of a 'scene' i.e.
A 3D box aligned with the x/y/z axes.
LightList mCurrentLightList
Changes with each call to setShadowMapsToPass.
const LightClosestArray & getShadowCastingLights(void) const
Class defining a single pass of a Technique (of a Material), i.e.
Definition: OgrePass.h:78
Abstract class defining the interface all renderable objects must implement.
AxisAlignedBox mCastersBox
Cached value.
CompositorShadowNodeDef const * mDefinition
ShadowMapCameraVec mShadowMapCameras
One per shadow map (whether texture or atlas)
size_t getNumShadowCastingLights(void) const
The return value may change in the future, which happens when the number of lights changes to or from...
Compositor nodes are the core subject of compositing.
Ogre::uint32 IdType
Big projects with lots, lots of units for very long periods of time (MMORPGs?) may want to define thi...
Definition: OgreId.h:36
Shadow Nodes are special nodes (not to be confused with.
A channel in the compositor transports textures between nodes.
const AxisAlignedBox & getCastersBox(void) const
mCastersBox
Real minDistance
ShadowCameraSetup mMinDistance
Defines the functionality of a 3D API.
Shadow Nodes are special nodes (not to be confused with.
Implementation of CompositorPass This implementation will perform main rendering, selecting several p...
vector< ShadowMapCamera >::type ShadowMapCameraVec
This utility class is used to hold the information used to generate the matrices and other informatio...