OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreSceneManager.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2 This source file is a part of OGRE
3 (Object-oriented Graphics Rendering Engine)
4 
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14 
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17 
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 THE SOFTWARE
25 
26 You may alternatively use this source under the terms of a specific version of
27 the OGRE Unrestricted License provided you have obtained such a license from
28 Torus Knot Software Ltd.
29 -------------------------------------------------------------------------*/
30 #ifndef __SceneManager_H__
31 #define __SceneManager_H__
32 
33 // Precompiler options
34 #include "OgrePrerequisites.h"
35 
36 #include "OgreString.h"
37 #include "OgreSceneNode.h"
38 #include "OgrePlane.h"
39 #include "OgreQuaternion.h"
40 #include "OgreColourValue.h"
41 #include "OgreCommon.h"
42 #include "OgreSceneQuery.h"
44 #include "OgreAnimationState.h"
45 #include "OgreRenderQueue.h"
47 #include "OgreRectangle2D.h"
48 #include "OgrePixelFormat.h"
50 #include "OgreTexture.h"
51 #include "OgreShadowCameraSetup.h"
53 #include "OgreCamera.h"
54 #include "OgreInstancedGeometry.h"
55 #include "OgreLodListener.h"
56 #include "OgreInstanceManager.h"
57 #include "OgreRenderSystem.h"
58 #include "OgreHeaderPrefix.h"
59 #include "OgreNameGenerator.h"
60 
61 namespace Ogre {
70  struct ViewPoint
71  {
74  };
75 
76  // Forward declarations
81  class CompositorChain;
82 
87  {
100 
102  void reset();
103  void merge(const AxisAlignedBox& boxBounds, const Sphere& sphereBounds,
104  const Camera* cam, bool receiver=true);
108  void mergeNonRenderedButInFrustum(const AxisAlignedBox& boxBounds,
109  const Sphere& sphereBounds, const Camera* cam);
110 
111 
112  };
113 
144  {
145  public:
163  {
164  _OgreExport bool operator()(const Material* x, const Material* y) const;
165  };
167  struct lightLess
168  {
169  _OgreExport bool operator()(const Light* a, const Light* b) const;
170  };
171 
174  {
180  IRS_RENDER_RECEIVER_PASS
181  };
182 
188  {
192  SCRQM_EXCLUDE
193  };
194 
196  {
203  };
204 
206  {
212  };
213 
215  {
217  };
218 
222  class Listener
223  {
224  public:
225  Listener() {}
226  virtual ~Listener() {}
227 
234  virtual void preUpdateSceneGraph(SceneManager* source, Camera* camera)
235  { (void)source; (void)camera; }
236 
243  virtual void postUpdateSceneGraph(SceneManager* source, Camera* camera)
244  { (void)source; (void)camera; }
245 
255  virtual void preFindVisibleObjects(SceneManager* source,
257  { (void)source; (void)irs; (void)v; }
258 
269  virtual void postFindVisibleObjects(SceneManager* source,
271  { (void)source; (void)irs; (void)v; }
272 
287  virtual void shadowTexturesUpdated(size_t numberOfShadowTextures)
288  { (void)numberOfShadowTextures; }
289 
303  virtual void shadowTextureCasterPreViewProj(Light* light,
304  Camera* camera, size_t iteration)
305  { (void)light; (void)camera; (void)iteration; }
306 
321  Frustum* frustum)
322  { (void)light; (void)frustum; }
323 
346  virtual bool sortLightsAffectingFrustum(LightList& lightList)
347  { (void)lightList; return false; }
348 
350  virtual void sceneManagerDestroyed(SceneManager* source)
351  { (void)source; }
352  };
353 
358  {
359  protected:
361  const Pass* mUsedPass;
362  public:
364  :transparentShadowCastersMode(false) {}
366  void visit(Renderable* r);
367  bool visit(const Pass* p);
368  void visit(RenderablePass* rp);
369 
380 
381  };
384 
385  protected:
386 
388  virtual SceneNode* createSceneNodeImpl(void);
390  virtual SceneNode* createSceneNodeImpl(const String& name);
391 
394 
398 
401 
404 
406 
410 
415 
418 
420 
428 
433 
436 
440 
441  // Sky params
442  // Sky plane
444  Entity* mSkyDomeEntity[5];
446 
450 
451  // Sky plane
456  // Sky box
461  // Sky dome
466 
467  // Fog
473 
478 
479  unsigned long mLastFrameNumber;
480  Matrix4 mTempXform[256];
483 
487 
488  protected:
489 
499 
503 
505  size_t mShadowTextureCountPerType[3];
506 
509 
512  {
514  int type;
518 
519  bool operator== (const LightInfo& rhs) const
520  {
521  return light == rhs.light && type == rhs.type &&
522  range == rhs.range && position == rhs.position && lightMask == rhs.lightMask;
523  }
524 
525  bool operator!= (const LightInfo& rhs) const
526  {
527  return !(*this == rhs);
528  }
529  };
530 
532 
535  LightInfoList mTestLightInfos; // potentially new list
538 
542  {
544  OGRE_MUTEX(mutex);
545  };
553  MovableObjectCollection* getMovableObjectCollection(const String& typeName);
558  const MovableObjectCollection* getMovableObjectCollection(const String& typeName) const;
560  OGRE_MUTEX(mMovableObjectCollectionMapMutex);
561 
566  virtual void initRenderQueue(void);
580  virtual const Pass* deriveShadowCasterPass(const Pass* pass);
589  virtual const Pass* deriveShadowReceiverPass(const Pass* pass);
590 
597  virtual bool validatePassForRendering(const Pass* pass);
598 
605  virtual bool validateRenderableForRendering(const Pass* pass, const Renderable* rend);
606 
607  enum BoxPlane
608  {
609  BP_FRONT = 0,
610  BP_BACK = 1,
611  BP_LEFT = 2,
612  BP_RIGHT = 3,
613  BP_UP = 4,
614  BP_DOWN = 5
615  };
616 
617  /* Internal utility method for creating the planes of a skybox.
618  */
619  virtual MeshPtr createSkyboxPlane(
620  BoxPlane bp,
621  Real distance,
622  const Quaternion& orientation,
623  const String& groupName);
624 
625  /* Internal utility method for creating the planes of a skydome.
626  */
627  virtual MeshPtr createSkydomePlane(
628  BoxPlane bp,
629  Real curvature, Real tiling, Real distance,
630  const Quaternion& orientation,
631  int xsegments, int ysegments, int ySegmentsToKeep,
632  const String& groupName);
633 
636 
640  OGRE_MUTEX(mAnimationsListMutex);
642 
643 
646  virtual void useRenderableViewProjMode(const Renderable* pRend, bool fixedFunction);
647 
650  virtual void resetViewProjMode(bool fixedFunction);
651 
654 
660  virtual void firePreRenderQueues();
662  virtual void firePostRenderQueues();
664  virtual bool fireRenderQueueStarted(uint8 id, const String& invocation);
666  virtual bool fireRenderQueueEnded(uint8 id, const String& invocation);
668  virtual void fireRenderSingleObject(Renderable* rend, const Pass* pass, const AutoParamDataSource* source,
669  const LightList* pLightList, bool suppressRenderStateChanges);
670 
672  virtual void fireShadowTexturesUpdated(size_t numberOfShadowTextures);
674  virtual void fireShadowTexturesPreCaster(Light* light, Camera* camera, size_t iteration);
676  virtual void fireShadowTexturesPreReceiver(Light* light, Frustum* f);
678  virtual void firePreUpdateSceneGraph(Camera* camera);
680  virtual void firePostUpdateSceneGraph(Camera* camera);
682  virtual void firePreFindVisibleObjects(Viewport* v);
684  virtual void firePostFindVisibleObjects(Viewport* v);
686  virtual void fireSceneManagerDestroyed();
688  virtual void setViewport(Viewport *vp);
689 
692 
694  virtual void renderVisibleObjectsDefaultSequence(void);
696  virtual void renderVisibleObjectsCustomSequence(RenderQueueInvocationSequence* s);
698  virtual void prepareRenderQueue(void);
699 
700 
716  virtual void renderSingleObject(Renderable* rend, const Pass* pass,
717  bool lightScissoringClipping, bool doLightIteration, const LightList* manualLightList = 0);
718 
721  {
722  return OGRE_NEW AutoParamDataSource();
723  }
724 
727 
730 
756  {
760  unsigned long clipPlanesValid;
761  LightClippingInfo() : scissorValid(false), clipPlanesValid(false) {}
762 
763  };
767 
770 
780  {
781  _OgreExport bool operator()(const Light* l1, const Light* l2) const;
782  };
783 
784 
791  virtual void findLightsAffectingFrustum(const Camera* camera);
793  virtual void initShadowVolumeMaterials(void);
795  virtual void ensureShadowTexturesCreated();
797  virtual void destroyShadowTextures(void);
798 
802 
804  void updateDirtyInstanceManagers(void);
805 
806  public:
810  virtual void prepareShadowTextures(Camera* cam, Viewport* vp, const LightList* lightList = 0);
811 
812  //A render context, used to store internal data for pausing/resuming rendering
814  {
820  };
821 
825  virtual RenderContext* _pauseRendering();
829  virtual void _resumeRendering(RenderContext* context);
830 
831  protected:
839  virtual void renderShadowVolumesToStencil(const Light* light, const Camera* cam,
840  bool calcScissor);
846  virtual void setShadowVolumeStencilState(bool secondpass, bool zfail, bool twosided);
848  void renderShadowVolumeObjects(ShadowCaster::ShadowRenderableListIterator iShadowRenderables,
849  Pass* pass, const LightList *manualLightList, unsigned long flags,
850  bool secondpass, bool zfail, bool twosided);
871 
875 
880 
881 
884 
887  {
888  protected:
893  const Camera* mCamera;
894  const Light* mLight;
896  public:
898  mCasterList(0), mIsLightInFrustum(false), mLightClipVolumeList(0),
899  mCamera(0) {}
900  // Prepare the listener for use with a set of parameters
901  void prepare(bool lightInFrustum,
902  const PlaneBoundedVolumeList* lightClipVolumes,
903  const Light* light, const Camera* cam, ShadowCasterList* casterList,
904  Real farDistSquared)
905  {
906  mCasterList = casterList;
907  mIsLightInFrustum = lightInFrustum;
908  mLightClipVolumeList = lightClipVolumes;
909  mCamera = cam;
910  mLight = light;
911  mFarDistSquared = farDistSquared;
912  }
913  bool queryResult(MovableObject* object);
914  bool queryResult(SceneQuery::WorldFragment* fragment);
915  };
916 
918 
925  virtual const ShadowCasterList& findShadowCastersForLight(const Light* light,
926  const Camera* camera);
928  virtual void renderBasicQueueGroupObjects(RenderQueueGroup* pGroup,
931  virtual void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* group,
934  virtual void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* group,
937  virtual void renderTextureShadowCasterQueueGroupObjects(RenderQueueGroup* group,
940  virtual void renderTextureShadowReceiverQueueGroupObjects(RenderQueueGroup* group,
943  virtual void renderModulativeTextureShadowedQueueGroupObjects(RenderQueueGroup* group,
945 
947  virtual void renderAdditiveTextureShadowedQueueGroupObjects(RenderQueueGroup* group,
950  virtual void renderObjects(const QueuedRenderableCollection& objs,
951  QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping,
952  bool doLightIteration, const LightList* manualLightList = 0);
958  virtual void renderTransparentShadowCasterObjects(const QueuedRenderableCollection& objs,
959  QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping,
960  bool doLightIteration, const LightList* manualLightList = 0);
961 
964  virtual void updateRenderQueueSplitOptions(void);
967  virtual void updateRenderQueueGroupSplitOptions(RenderQueueGroup* group,
968  bool suppressShadows, bool suppressRenderState);
969 
971  virtual ClipResult buildAndSetScissor(const LightList& ll, const Camera* cam);
973  virtual void buildScissor(const Light* l, const Camera* cam, RealRect& rect);
974  virtual void resetScissor();
976  virtual ClipResult buildAndSetLightClip(const LightList& ll);
977  virtual void buildLightClip(const Light* l, PlaneList& planes);
978  virtual void resetLightClip();
979  virtual void checkCachedLightClippingInfo();
980 
985 
990 
993  unsigned short mLastLightLimit;
997 
998  virtual void useLights(const LightList& lights, unsigned short limit);
999  virtual void setViewMatrix(const Matrix4& m);
1000  virtual void useLightsGpuProgram(const Pass* pass, const LightList* lights);
1001  virtual void bindGpuProgram(GpuProgram* prog);
1002  virtual void updateGpuProgramParameters(const Pass* p);
1003 
1004 
1005 
1006 
1007 
1008 
1009 
1010 
1014 
1018 
1022 
1026 
1027  public:
1030  SceneManager(const String& instanceName);
1031 
1034  virtual ~SceneManager();
1035 
1036 
1062  OGRE_MUTEX(sceneGraphMutex);
1063 
1065  const String& getName(void) const { return mName; }
1066 
1073  virtual const String& getTypeName(void) const = 0;
1074 
1082  virtual Camera* createCamera(const String& name);
1083 
1087  virtual Camera* getCamera(const String& name) const;
1088 
1091  virtual bool hasCamera(const String& name) const;
1092 
1101  virtual void destroyCamera(Camera *cam);
1102 
1108  virtual void destroyCamera(const String& name);
1109 
1118  virtual void destroyAllCameras(void);
1119 
1130  virtual Light* createLight(const String& name);
1131 
1133  virtual Light* createLight();
1134 
1138  virtual Light* getLight(const String& name) const;
1139 
1142  virtual bool hasLight(const String& name) const;
1143 
1146  virtual const PlaneList& getLightClippingPlanes(Light* l);
1147 
1150  virtual const RealRect& getLightScissorRect(Light* l, const Camera* cam);
1151 
1156  virtual void destroyLight(const String& name);
1157 
1162  virtual void destroyLight(Light* light);
1165  virtual void destroyAllLights(void);
1166 
1177  virtual void _notifyLightsDirty(void);
1178 
1191  ulong _getLightsDirtyCounter(void) const { return mLightsDirtyCounter; }
1192 
1199  virtual const LightList& _getLightsAffectingFrustum(void) const;
1200 
1223  virtual void _populateLightList(const Vector3& position, Real radius, LightList& destList, uint32 lightMask = 0xFFFFFFFF);
1224 
1253  virtual void _populateLightList(const SceneNode* sn, Real radius, LightList& destList, uint32 lightMask = 0xFFFFFFFF);
1254 
1271  virtual SceneNode* createSceneNode(void);
1272 
1287  virtual SceneNode* createSceneNode(const String& name);
1288 
1295  virtual void destroySceneNode(const String& name);
1296 
1303  virtual void destroySceneNode(SceneNode* sn);
1319  virtual SceneNode* getRootSceneNode(void);
1320 
1328  virtual SceneNode* getSceneNode(const String& name) const;
1329 
1332  virtual bool hasSceneNode(const String& name) const;
1333 
1334 
1342  virtual Entity* createEntity(const String& entityName, const String& meshName, const String& groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME );
1343 
1350  virtual Entity* createEntity(const String& entityName, const MeshPtr& pMesh );
1351 
1357  virtual Entity* createEntity(const String& meshName);
1358 
1363  virtual Entity* createEntity(const MeshPtr& pMesh);
1364 
1371  enum PrefabType {
1374  PT_SPHERE
1375  };
1376 
1383  virtual Entity* createEntity(const String& entityName, PrefabType ptype);
1384 
1388  virtual Entity* createEntity(PrefabType ptype);
1392  virtual Entity* getEntity(const String& name) const;
1395  virtual bool hasEntity(const String& name) const;
1396 
1405  virtual void destroyEntity(Entity* ent);
1406 
1415  virtual void destroyEntity(const String& name);
1416 
1426  virtual void destroyAllEntities(void);
1427 
1433  virtual ManualObject* createManualObject(const String& name);
1437  virtual ManualObject* createManualObject();
1441  virtual ManualObject* getManualObject(const String& name) const;
1444  virtual bool hasManualObject(const String& name) const;
1445 
1448  virtual void destroyManualObject(ManualObject* obj);
1451  virtual void destroyManualObject(const String& name);
1454  virtual void destroyAllManualObjects(void);
1460  virtual BillboardChain* createBillboardChain(const String& name);
1464  virtual BillboardChain* createBillboardChain();
1468  virtual BillboardChain* getBillboardChain(const String& name) const;
1471  virtual bool hasBillboardChain(const String& name) const;
1472 
1475  virtual void destroyBillboardChain(BillboardChain* obj);
1478  virtual void destroyBillboardChain(const String& name);
1481  virtual void destroyAllBillboardChains(void);
1487  virtual RibbonTrail* createRibbonTrail(const String& name);
1491  virtual RibbonTrail* createRibbonTrail();
1495  virtual RibbonTrail* getRibbonTrail(const String& name) const;
1498  virtual bool hasRibbonTrail(const String& name) const;
1499 
1502  virtual void destroyRibbonTrail(RibbonTrail* obj);
1505  virtual void destroyRibbonTrail(const String& name);
1508  virtual void destroyAllRibbonTrails(void);
1509 
1530  virtual ParticleSystem* createParticleSystem(const String& name,
1531  const String& templateName);
1551  virtual ParticleSystem* createParticleSystem(const String& name,
1552  size_t quota = 500,
1554 
1572  virtual ParticleSystem* createParticleSystem(size_t quota = 500,
1577  virtual ParticleSystem* getParticleSystem(const String& name) const;
1580  virtual bool hasParticleSystem(const String& name) const;
1581 
1584  virtual void destroyParticleSystem(ParticleSystem* obj);
1587  virtual void destroyParticleSystem(const String& name);
1590  virtual void destroyAllParticleSystems(void);
1591 
1597  virtual void clearScene(void);
1598 
1611  void setAmbientLight(const ColourValue& colour);
1612 
1615  const ColourValue& getAmbientLight(void) const;
1616 
1632  virtual void prepareWorldGeometry(const String& filename);
1633 
1651  virtual void prepareWorldGeometry(DataStreamPtr& stream,
1652  const String& typeName = StringUtil::BLANK);
1653 
1666  virtual void setWorldGeometry(const String& filename);
1667 
1683  virtual void setWorldGeometry(DataStreamPtr& stream,
1684  const String& typeName = StringUtil::BLANK);
1685 
1698  virtual size_t estimateWorldGeometry(const String& filename)
1699  { (void)filename; return 0; }
1700 
1713  virtual size_t estimateWorldGeometry(DataStreamPtr& stream,
1714  const String& typeName = StringUtil::BLANK)
1715  { (void)stream; (void)typeName; return 0; }
1716 
1731  virtual ViewPoint getSuggestedViewpoint(bool random = false);
1732 
1746  virtual bool setOption( const String& strKey, const void* pValue )
1747  { (void)strKey; (void)pValue; return false; }
1748 
1762  virtual bool getOption( const String& strKey, void* pDestValue )
1763  { (void)strKey; (void)pDestValue; return false; }
1764 
1774  virtual bool hasOption( const String& strKey ) const
1775  { (void)strKey; return false; }
1776 
1791  virtual bool getOptionValues( const String& strKey, StringVector& refValueList )
1792  { (void)strKey; (void)refValueList; return false; }
1793 
1800  virtual bool getOptionKeys( StringVector& refKeys )
1801  { (void)refKeys; return false; }
1802 
1811  virtual void _updateSceneGraph(Camera* cam);
1812 
1824  virtual void _findVisibleObjects(Camera* cam, VisibleObjectsBoundsInfo* visibleBounds, bool onlyShadowCasters);
1825 
1830  virtual void _applySceneAnimations(void);
1831 
1834  virtual void _renderVisibleObjects(void);
1835 
1849  virtual void _renderScene(Camera* camera, Viewport* vp, bool includeOverlays);
1850 
1854  virtual void _queueSkiesForRendering(Camera* cam);
1855 
1856 
1857 
1866  virtual void _setDestinationRenderSystem(RenderSystem* sys);
1867 
1921  virtual void setSkyPlane(
1922  bool enable,
1923  const Plane& plane, const String& materialName, Real scale = 1000,
1924  Real tiling = 10, bool drawFirst = true, Real bow = 0,
1925  int xsegments = 1, int ysegments = 1,
1970  virtual void _setSkyPlane(
1971  bool enable,
1972  const Plane& plane, const String& materialName, Real scale = 1000,
1973  Real tiling = 10, uint8 renderQueue = RENDER_QUEUE_SKIES_EARLY, Real bow = 0,
1974  int xsegments = 1, int ysegments = 1,
1976 
1978  virtual void setSkyPlaneEnabled(bool enable) { mSkyPlaneEnabled = enable; }
1979 
1981  virtual bool isSkyPlaneEnabled(void) const { return mSkyPlaneEnabled; }
1982 
1984  virtual SceneNode* getSkyPlaneNode(void) const { return mSkyPlaneNode; }
1985 
1987  virtual const SkyPlaneGenParameters& getSkyPlaneGenParameters(void) const { return mSkyPlaneGenParameters; }
1988 
2030  virtual void setSkyBox(
2031  bool enable, const String& materialName, Real distance = 5000,
2032  bool drawFirst = true, const Quaternion& orientation = Quaternion::IDENTITY,
2034 
2067  virtual void _setSkyBox(
2068  bool enable, const String& materialName, Real distance = 5000,
2069  uint8 renderQueue = RENDER_QUEUE_SKIES_EARLY, const Quaternion& orientation = Quaternion::IDENTITY,
2071 
2073  virtual void setSkyBoxEnabled(bool enable) { mSkyBoxEnabled = enable; }
2074 
2076  virtual bool isSkyBoxEnabled(void) const { return mSkyBoxEnabled; }
2077 
2079  virtual SceneNode* getSkyBoxNode(void) const { return mSkyBoxNode; }
2080 
2082  virtual const SkyBoxGenParameters& getSkyBoxGenParameters(void) const { return mSkyBoxGenParameters; }
2083 
2139  virtual void setSkyDome(
2140  bool enable, const String& materialName, Real curvature = 10,
2141  Real tiling = 8, Real distance = 4000, bool drawFirst = true,
2142  const Quaternion& orientation = Quaternion::IDENTITY,
2143  int xsegments = 16, int ysegments = 16, int ysegments_keep = -1,
2145 
2192  virtual void _setSkyDome(
2193  bool enable, const String& materialName, Real curvature = 10,
2194  Real tiling = 8, Real distance = 4000, uint8 renderQueue = RENDER_QUEUE_SKIES_EARLY,
2195  const Quaternion& orientation = Quaternion::IDENTITY,
2196  int xsegments = 16, int ysegments = 16, int ysegments_keep = -1,
2198 
2200  virtual void setSkyDomeEnabled(bool enable) { mSkyDomeEnabled = enable; }
2201 
2203  virtual bool isSkyDomeEnabled(void) const { return mSkyDomeEnabled; }
2204 
2206  virtual SceneNode* getSkyDomeNode(void) const { return mSkyDomeNode; }
2207 
2209  virtual const SkyDomeGenParameters& getSkyDomeGenParameters(void) const { return mSkyDomeGenParameters; }
2210 
2235  void setFog(
2236  FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White,
2237  Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0);
2238 
2241  virtual FogMode getFogMode(void) const;
2242 
2245  virtual const ColourValue& getFogColour(void) const;
2246 
2249  virtual Real getFogStart(void) const;
2250 
2253  virtual Real getFogEnd(void) const;
2254 
2257  virtual Real getFogDensity(void) const;
2258 
2259 
2277  virtual BillboardSet* createBillboardSet(const String& name, unsigned int poolSize = 20);
2278 
2285  virtual BillboardSet* createBillboardSet(unsigned int poolSize = 20);
2289  virtual BillboardSet* getBillboardSet(const String& name) const;
2292  virtual bool hasBillboardSet(const String& name) const;
2293 
2300  virtual void destroyBillboardSet(BillboardSet* set);
2301 
2308  virtual void destroyBillboardSet(const String& name);
2309 
2319  virtual void destroyAllBillboardSets(void);
2320 
2328  virtual void setDisplaySceneNodes(bool display);
2330  virtual bool getDisplaySceneNodes(void) const {return mDisplayNodes;}
2331 
2352  virtual Animation* createAnimation(const String& name, Real length);
2353 
2357  virtual Animation* getAnimation(const String& name) const;
2360  virtual bool hasAnimation(const String& name) const;
2361 
2367  virtual void destroyAnimation(const String& name);
2368 
2370  virtual void destroyAllAnimations(void);
2371 
2399  virtual AnimationState* createAnimationState(const String& animName);
2400 
2404  virtual AnimationState* getAnimationState(const String& animName) const;
2407  virtual bool hasAnimationState(const String& name) const;
2408 
2414  virtual void destroyAnimationState(const String& name);
2415 
2417  virtual void destroyAllAnimationStates(void);
2418 
2442  virtual void manualRender(RenderOperation* rend, Pass* pass, Viewport* vp,
2443  const Matrix4& worldMatrix, const Matrix4& viewMatrix, const Matrix4& projMatrix,
2444  bool doBeginEndFrame = false) ;
2445 
2465  virtual void manualRender(Renderable* rend, const Pass* pass, Viewport* vp,
2466  const Matrix4& viewMatrix, const Matrix4& projMatrix, bool doBeginEndFrame = false, bool lightScissoringClipping = true,
2467  bool doLightIteration = true, const LightList* manualLightList = 0);
2468 
2479  virtual RenderQueue* getRenderQueue(void);
2480 
2484  virtual void addRenderQueueListener(RenderQueueListener* newListener);
2485 
2487  virtual void removeRenderQueueListener(RenderQueueListener* delListener);
2488 
2491  virtual void addRenderObjectListener(RenderObjectListener* newListener);
2493  virtual void removeRenderObjectListener(RenderObjectListener* delListener);
2494 
2508  virtual void addSpecialCaseRenderQueue(uint8 qid);
2514  virtual void removeSpecialCaseRenderQueue(uint8 qid);
2518  virtual void clearSpecialCaseRenderQueues(void);
2523  virtual void setSpecialCaseRenderQueueMode(SpecialCaseRenderQueueMode mode);
2525  virtual SpecialCaseRenderQueueMode getSpecialCaseRenderQueueMode(void);
2532  virtual bool isRenderQueueToBeProcessed(uint8 qid);
2533 
2549  virtual void setWorldGeometryRenderQueue(uint8 qid);
2560  virtual uint8 getWorldGeometryRenderQueue(void);
2561 
2563  virtual void showBoundingBoxes(bool bShow);
2564 
2566  virtual bool getShowBoundingBoxes() const;
2567 
2569  virtual void _notifyAutotrackingSceneNode(SceneNode* node, bool autoTrack);
2570 
2571 
2584  virtual AxisAlignedBoxSceneQuery*
2585  createAABBQuery(const AxisAlignedBox& box, uint32 mask = 0xFFFFFFFF);
2598  virtual SphereSceneQuery*
2599  createSphereQuery(const Sphere& sphere, uint32 mask = 0xFFFFFFFF);
2613  createPlaneBoundedVolumeQuery(const PlaneBoundedVolumeList& volumes, uint32 mask = 0xFFFFFFFF);
2614 
2615 
2628  virtual RaySceneQuery*
2629  createRayQuery(const Ray& ray, uint32 mask = 0xFFFFFFFF);
2630  //PyramidSceneQuery* createPyramidQuery(const Pyramid& p, unsigned long mask = 0xFFFFFFFF);
2642  virtual IntersectionSceneQuery*
2643  createIntersectionQuery(uint32 mask = 0xFFFFFFFF);
2644 
2646  virtual void destroyQuery(SceneQuery* query);
2647 
2650 
2654  return CameraIterator(mCameras.begin(), mCameras.end());
2655  }
2658  const CameraList& getCameras() const { return mCameras; }
2661  return AnimationIterator(mAnimationsList.begin(), mAnimationsList.end());
2662  }
2665  const AnimationList& getAnimations() const { return mAnimationsList; }
2668  return mAnimationStates.getAnimationStateIterator();
2669  }
2670 
2703  virtual void setShadowTechnique(ShadowTechnique technique);
2704 
2706  virtual ShadowTechnique getShadowTechnique(void) const { return mShadowTechnique; }
2707 
2709  virtual void setShowDebugShadows(bool debug) { mDebugShadows = debug; }
2711  virtual bool getShowDebugShadows(void ) const { return mDebugShadows; }
2712 
2719  virtual void setShadowColour(const ColourValue& colour);
2726  virtual const ColourValue& getShadowColour(void) const;
2738  virtual void setShadowDirectionalLightExtrusionDistance(Real dist);
2741  virtual Real getShadowDirectionalLightExtrusionDistance(void) const;
2758  virtual void setShadowFarDistance(Real distance);
2762  virtual Real getShadowFarDistance(void) const
2763  { return mDefaultShadowFarDist; }
2764  virtual Real getShadowFarDistanceSquared(void) const
2765  { return mDefaultShadowFarDistSquared; }
2766 
2792  virtual void setShadowIndexBufferSize(size_t size);
2794  virtual size_t getShadowIndexBufferSize(void) const
2795  { return mShadowIndexBufferSize; }
2804  virtual void setShadowTextureSize(unsigned short size);
2805 
2815  virtual void setShadowTextureConfig(size_t shadowIndex, unsigned short width,
2816  unsigned short height, PixelFormat format, unsigned short fsaa = 0, uint16 depthBufferPoolId=1);
2822  virtual void setShadowTextureConfig(size_t shadowIndex,
2823  const ShadowTextureConfig& config);
2824 
2826  ConstShadowTextureConfigIterator getShadowTextureConfigIterator() const;
2827 
2839  virtual void setShadowTexturePixelFormat(PixelFormat fmt);
2846  virtual void setShadowTextureFSAA(unsigned short fsaa);
2847 
2855  virtual void setShadowTextureCount(size_t count);
2857  size_t getShadowTextureCount(void) const {return mShadowTextureConfigList.size(); }
2858 
2869  { mShadowTextureCountPerType[type] = count; }
2872  {return mShadowTextureCountPerType[type]; }
2873 
2881  virtual void setShadowTextureSettings(unsigned short size, unsigned short count,
2882  PixelFormat fmt = PF_X8R8G8B8, unsigned short fsaa = 0, uint16 depthBufferPoolId=1);
2883 
2890  virtual const TexturePtr& getShadowTexture(size_t shadowIndex);
2891 
2906  virtual void setShadowDirLightTextureOffset(Real offset) { mShadowTextureOffset = offset;}
2910  virtual Real getShadowDirLightTextureOffset(void) const { return mShadowTextureOffset; }
2918  virtual void setShadowTextureFadeStart(Real fadeStart)
2919  { mShadowTextureFadeStart = fadeStart; }
2927  virtual void setShadowTextureFadeEnd(Real fadeEnd)
2928  { mShadowTextureFadeEnd = fadeEnd; }
2929 
2942  virtual void setShadowTextureSelfShadow(bool selfShadow);
2943 
2945  virtual bool getShadowTextureSelfShadow(void) const
2946  { return mShadowTextureSelfShadow; }
2967  virtual void setShadowTextureCasterMaterial(const String& name);
2989  virtual void setShadowTextureReceiverMaterial(const String& name);
2990 
3001  virtual void setShadowCasterRenderBackFaces(bool bf) { mShadowCasterRenderBackFaces = bf; }
3002 
3006  virtual bool getShadowCasterRenderBackFaces() const { return mShadowCasterRenderBackFaces; }
3007 
3012  virtual void setShadowCameraSetup(const ShadowCameraSetupPtr& shadowSetup);
3013 
3018  virtual const ShadowCameraSetupPtr& getShadowCameraSetup() const;
3019 
3056  virtual void setShadowUseInfiniteFarPlane(bool enable) {
3057  mShadowUseInfiniteFarPlane = enable; }
3058 
3060  virtual bool isShadowTechniqueStencilBased(void) const
3061  { return (mShadowTechnique & SHADOWDETAILTYPE_STENCIL) != 0; }
3063  virtual bool isShadowTechniqueTextureBased(void) const
3064  { return (mShadowTechnique & SHADOWDETAILTYPE_TEXTURE) != 0; }
3066  virtual bool isShadowTechniqueModulative(void) const
3067  { return (mShadowTechnique & SHADOWDETAILTYPE_MODULATIVE) != 0; }
3069  virtual bool isShadowTechniqueAdditive(void) const
3070  { return (mShadowTechnique & SHADOWDETAILTYPE_ADDITIVE) != 0; }
3072  virtual bool isShadowTechniqueIntegrated(void) const
3073  { return (mShadowTechnique & SHADOWDETAILTYPE_INTEGRATED) != 0; }
3075  virtual bool isShadowTechniqueInUse(void) const
3076  { return mShadowTechnique != SHADOWTYPE_NONE; }
3080  virtual void setShadowUseLightClipPlanes(bool enabled) { mShadowAdditiveLightClip = enabled; }
3084  virtual bool getShadowUseLightClipPlanes() const { return mShadowAdditiveLightClip; }
3085 
3089  virtual void _setActiveCompositorChain(CompositorChain* chain) { mActiveCompositorChain = chain; }
3090 
3096  virtual void setLateMaterialResolving(bool isLate) { mLateMaterialResolving = isLate; }
3097 
3100  virtual bool isLateMaterialResolving() const { return mLateMaterialResolving; }
3101 
3103  virtual CompositorChain* _getActiveCompositorChain() const { return mActiveCompositorChain; }
3104 
3107  virtual void addListener(Listener* s);
3110  virtual void removeListener(Listener* s);
3111 
3121  virtual StaticGeometry* createStaticGeometry(const String& name);
3125  virtual StaticGeometry* getStaticGeometry(const String& name) const;
3127  virtual bool hasStaticGeometry(const String& name) const;
3129  virtual void destroyStaticGeometry(StaticGeometry* geom);
3131  virtual void destroyStaticGeometry(const String& name);
3133  virtual void destroyAllStaticGeometry(void);
3134 
3144  virtual InstancedGeometry* createInstancedGeometry(const String& name);
3146  virtual InstancedGeometry* getInstancedGeometry(const String& name) const;
3148  virtual void destroyInstancedGeometry(InstancedGeometry* geom);
3150  virtual void destroyInstancedGeometry(const String& name);
3152  virtual void destroyAllInstancedGeometry(void);
3153 
3172  virtual InstanceManager* createInstanceManager( const String &customName, const String &meshName,
3173  const String &groupName,
3175  size_t numInstancesPerBatch, uint16 flags=0,
3176  unsigned short subMeshIdx=0 );
3177 
3181  virtual InstanceManager* getInstanceManager( const String &managerName ) const;
3182 
3184  virtual bool hasInstanceManager( const String &managerName ) const;
3185 
3192  virtual void destroyInstanceManager( const String &name );
3193  virtual void destroyInstanceManager( InstanceManager *instanceManager );
3194 
3195  virtual void destroyAllInstanceManagers(void);
3196 
3209  virtual size_t getNumInstancesPerBatch( const String &meshName, const String &groupName,
3210  const String &materialName,
3212  size_t numInstancesPerBatch, uint16 flags=0,
3213  unsigned short subMeshIdx=0 );
3214 
3226  virtual InstancedEntity* createInstancedEntity( const String &materialName,
3227  const String &managerName );
3228 
3233  virtual void destroyInstancedEntity( InstancedEntity *instancedEntity );
3234 
3239  void _addDirtyInstanceManager( InstanceManager *dirtyManager );
3240 
3251  virtual MovableObject* createMovableObject(const String& name,
3252  const String& typeName, const NameValuePairList* params = 0);
3262  virtual MovableObject* createMovableObject(const String& typeName, const NameValuePairList* params = 0);
3268  virtual void destroyMovableObject(const String& name, const String& typeName);
3274  virtual void destroyMovableObject(MovableObject* m);
3276  virtual void destroyAllMovableObjectsByType(const String& typeName);
3278  virtual void destroyAllMovableObjects(void);
3282  virtual MovableObject* getMovableObject(const String& name, const String& typeName) const;
3284  virtual bool hasMovableObject(const String& name, const String& typeName) const;
3291  virtual MovableObjectIterator getMovableObjectIterator(const String& typeName);
3303  virtual void injectMovableObject(MovableObject* m);
3310  virtual void extractMovableObject(const String& name, const String& typeName);
3317  virtual void extractMovableObject(MovableObject* m);
3324  virtual void extractAllMovableObjectsByType(const String& typeName);
3325 
3332  virtual void setVisibilityMask(uint32 vmask) { mVisibilityMask = vmask; }
3333 
3337  virtual uint32 getVisibilityMask(void) { return mVisibilityMask; }
3338 
3342  uint32 _getCombinedVisibilityMask(void) const;
3343 
3350  virtual void setFindVisibleObjects(bool find) { mFindVisibleObjects = find; }
3351 
3355  virtual bool getFindVisibleObjects(void) { return mFindVisibleObjects; }
3356 
3365  virtual void setNormaliseNormalsOnScale(bool n) { mNormaliseNormalsOnScale = n; }
3366 
3370  virtual bool getNormaliseNormalsOnScale() const { return mNormaliseNormalsOnScale; }
3371 
3380  virtual void setFlipCullingOnNegativeScale(bool n) { mFlipCullingOnNegativeScale = n; }
3381 
3385  virtual bool getFlipCullingOnNegativeScale() const { return mFlipCullingOnNegativeScale; }
3386 
3392  virtual void _injectRenderWithPass(Pass *pass, Renderable *rend, bool shadowDerivation = true,
3393  bool doLightIteration = false, const LightList* manualLightList = 0);
3394 
3413  virtual void _suppressRenderStateChanges(bool suppress);
3414 
3418  virtual bool _areRenderStateChangesSuppressed(void) const
3419  { return mSuppressRenderStateChanges; }
3420 
3433  virtual const Pass* _setPass(const Pass* pass,
3434  bool evenIfSuppressed = false, bool shadowDerivation = true);
3435 
3443  virtual void _markGpuParamsDirty(uint16 mask);
3444 
3445 
3455  virtual void _suppressShadows(bool suppress);
3456 
3460  virtual bool _areShadowsSuppressed(void) const
3461  { return mSuppressShadows; }
3462 
3466  virtual void _renderQueueGroupObjects(RenderQueueGroup* group,
3468 
3484  void setQueuedRenderableVisitor(SceneMgrQueuedRenderableVisitor* visitor);
3485 
3487  SceneMgrQueuedRenderableVisitor* getQueuedRenderableVisitor(void) const;
3488 
3489 
3493  RenderSystem *getDestinationRenderSystem();
3494 
3497  Viewport* getCurrentViewport(void) const { return mCurrentViewport; }
3498 
3500  const VisibleObjectsBoundsInfo& getVisibleObjectsBoundsInfo(const Camera* cam) const;
3501 
3503  const VisibleObjectsBoundsInfo& getShadowCasterBoundsInfo(const Light* light, size_t iteration = 0) const;
3504 
3519  virtual void setCameraRelativeRendering(bool rel) { mCameraRelativeRendering = rel; }
3520 
3524  virtual bool getCameraRelativeRendering() const { return mCameraRelativeRendering; }
3525 
3526 
3528  void addLodListener(LodListener *listener);
3529 
3535  void removeLodListener(LodListener *listener);
3536 
3538  void _notifyMovableObjectLodChanged(MovableObjectLodChangedEvent& evt);
3539 
3541  void _notifyEntityMeshLodChanged(EntityMeshLodChangedEvent& evt);
3542 
3544  void _notifyEntityMaterialLodChanged(EntityMaterialLodChangedEvent& evt);
3545 
3547  void _handleLodEvents();
3548 
3549  IlluminationRenderStage _getCurrentRenderStage() {return mIlluminationStage;}
3550  };
3551 
3554  public IntersectionSceneQuery
3555  {
3556  public:
3559 
3561  void execute(IntersectionSceneQueryListener* listener);
3562  };
3563 
3566  {
3567  public:
3570 
3572  void execute(RaySceneQueryListener* listener);
3573  };
3576  {
3577  public:
3580 
3582  void execute(SceneQueryListener* listener);
3583  };
3586  {
3587  public:
3590 
3592  void execute(SceneQueryListener* listener);
3593  };
3596  {
3597  public:
3600 
3602  void execute(SceneQueryListener* listener);
3603  };
3604 
3605 
3608 
3613  {
3619  };
3620 
3623  {
3632  };
3633 
3634 
3635 
3638  {
3639  protected:
3641  mutable bool mMetaDataInit;
3643  virtual void initMetaData(void) const = 0;
3644  public:
3645  SceneManagerFactory() : mMetaDataInit(true) {}
3648  virtual const SceneManagerMetaData& getMetaData(void) const
3649  {
3650  if (mMetaDataInit)
3651  {
3652  initMetaData();
3653  mMetaDataInit = false;
3654  }
3655  return mMetaData;
3656  }
3661  virtual SceneManager* createInstance(const String& instanceName) = 0;
3663  virtual void destroyInstance(SceneManager* instance) = 0;
3664 
3665  };
3666 
3671 } // Namespace
3672 
3673 #include "OgreHeaderSuffix.h"
3674 
3675 #endif
Chain of compositor effects applying to one viewport.
Representation of a ray in space, i.e.
Definition: OgreRay.h:46
Class encapsulating a set of AnimationState objects.
Render to texture stage, used for texture based shadows.
Viewport * getCurrentViewport(void) const
Gets the current viewport being rendered (advanced use only, only valid during viewport update...
SceneNode * mSkyPlaneNode
unsigned char uint8
Definition: OgrePlatform.h:346
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
virtual void setShadowTextureFadeStart(Real fadeStart)
Sets the proportional distance at which texture shadows begin to fade out.
Represents part of the world geometry that is a result of a SceneQuery.
SceneType
Classification of a scene to allow a decision of what type of SceenManager to provide back to the app...
virtual bool getOptionValues(const String &strKey, StringVector &refValueList)
Method for getting all possible values for a specific option.
static uint32 FRUSTUM_TYPE_MASK
Query type mask which will be used for frusta and cameras.
virtual void setNormaliseNormalsOnScale(bool n)
Set whether to automatically normalise normals on objects whenever they are scaled.
Class defining particle system based special effects.
map< const Camera *, VisibleObjectsBoundsInfo >::type CamVisibleObjectsMap
Visible objects bounding box list.
bool mSuppressShadows
Suppress shadows?
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
virtual void _setActiveCompositorChain(CompositorChain *chain)
Sets the active compositor chain of the current scene being rendered.
const Pass * mUsedPass
Pass that was actually used at the grouping level.
SceneNode * mSceneRoot
Root scene node.
ulong _getLightsDirtyCounter(void) const
Advance method to gets the lights dirty counter.
float Real
Software floating point type.
MovableObjectLodChangedEventList mMovableObjectLodChangedEvents
GpuProgramParametersSharedPtr mFiniteExtrusionParams
virtual void shadowTextureCasterPreViewProj(Light *light, Camera *camera, size_t iteration)
This event occurs just before the view & projection matrices are set for rendering into a shadow text...
unsigned int uint32
Definition: OgrePlatform.h:344
virtual void preFindVisibleObjects(SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called prior to searching for visible objects in this SceneManager.
virtual void setShadowUseInfiniteFarPlane(bool enable)
Sets whether we should use an inifinite camera far plane when rendering stencil shadows.
SceneMgrQueuedRenderableVisitor mDefaultQueuedRenderableVisitor
Storage for default renderable visitor.
virtual void sceneManagerDestroyed(SceneManager *source)
Event notifying the listener of the SceneManager's destruction.
virtual void preUpdateSceneGraph(SceneManager *source, Camera *camera)
Called prior to updating the scene graph in this SceneManager.
#define _OgreExport
Definition: OgrePlatform.h:260
MapIterator< AnimationList > AnimationIterator
virtual bool isShadowTechniqueStencilBased(void) const
Is there a stencil shadow based shadowing technique in use?
Pre-transforms and batches up meshes for efficient use as instanced geometry in a scene...
bool transparentShadowCastersMode
Are we in transparent shadow caster mode?
Struct associating a single Pass with a single Renderable.
static uint32 ENTITY_TYPE_MASK
Query type mask which will be used for entities.
Default sorting routine which sorts lights which cast shadows to the front of a list, sub-sorting by distance.
unsigned long ulong
Utility class to generate a sequentially numbered series of names.
GpuProgramParametersSharedPtr mShadowTextureCustomCasterFPParams
String typeName
A globally unique string identifying the scene manager type.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Pre-transforms and batches up meshes for efficient use as static geometry in a scene.
Defines a plane in 3D space.
Definition: OgrePlane.h:61
FogMode
Fog modes.
Definition: OgreCommon.h:121
#define OGRE_MUTEX(name)
vector< InstanceManager * >::type InstanceManagerVec
ShadowTextureCameraList mShadowTextureCameras
Abstract interface which classes must implement if they wish to receive events from the scene manager...
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same ti...
Real mShadowTextureFadeStart
Proportion of texture offset in view direction e.g. 0.4.
uint16 mGpuParamsDirty
Gpu params that need rebinding (mask of GpuParamVariability)
uint32 mLastLightHash
Last light sets.
Real maxDistanceInFrustum
The farthest object in the frustum regardless of visibility / shadow caster flags.
Class providing a much simplified interface to generating manual objects with custom geometry...
map< String, MovableObject * >::type MovableObjectMap
Viewport * mCurrentViewport
Current Viewport.
StaticGeometryList mStaticGeometryList
String mShadowTextureCustomReceiverFragmentProgram
SkyDomeGenParameters mSkyDomeGenParameters
AxisAlignedBox receiverAabb
The axis-aligned bounds of the visible shadow receiver objects.
Class representing colour.
Mask for additive shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:196
map< String, InstanceManager * >::type InstanceManagerMap
static const ColourValue White
SceneTypeMask sceneTypeMask
A mask describing which sorts of scenes this manager can handle.
PrefabType
Prefab shapes available without loading a model.
static uint32 FX_TYPE_MASK
Query type mask which will be used for effects like billboardsets / particle systems.
ShadowTextureList mShadowTextures
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Definition: OgreFrustum.h:85
A class for performing queries on a scene.
Manages the organisation and rendering of a 'scene' i.e.
Render only the queues in the special case list.
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Comparator for material map, for sorting materials into render order (e.g.
vector< LightInfo >::type LightInfoList
Defines a program which runs on the GPU such as a vertex or fragment program.
static String DEFAULT_RESOURCE_GROUP_NAME
Default resource group name.
unsigned long mLastFrameNumber
LightTypes
Defines the type of light.
Definition: OgreLight.h:82
virtual SceneNode * getSkyPlaneNode(void) const
Get the sky plane node, if enabled.
Struct for caching light clipping information for re-use in a frame.
IlluminationRenderStage mIlluminationStage
virtual bool isShadowTechniqueAdditive(void) const
Is there an additive shadowing technique in use?
AnimationList mAnimationsList
virtual bool getShadowCasterRenderBackFaces() const
Gets whether or not shadow casters should be rendered into shadow textures using their back faces rat...
map< String, InstancedGeometry * >::type InstancedGeometryList
Class encapsulates rendering properties of an object.
Definition: OgreMaterial.h:88
bool worldGeometrySupported
Flag indicating whether world geometry is supported.
Inner class to use as callback for shadow caster scene query.
Specialises the SceneQuery class for querying within a sphere.
Simple structure to hold MovableObject map and a mutex to go with it.
SkyBoxGenParameters mSkyBoxGenParameters
uint32 lightMask
Sets to zero if directional light.
A 3D box aligned with the x/y/z axes.
OrganisationMode
Organisation modes required for this collection.
Represents the state of an animation and the weight of its influence.
RenderQueue * mRenderQueue
Queue of objects for rendering.
First queue (after backgrounds), used for skyboxes if rendered first.
vector< TexturePtr >::type ShadowTextureList
virtual Real getShadowFarDistanceSquared(void) const
vector< Listener * >::type ListenerList
virtual bool isSkyDomeEnabled(void) const
Return whether a skydome is enabled.
virtual bool sortLightsAffectingFrustum(LightList &lightList)
Hook to allow the listener to override the ordering of lights for the entire frustum.
virtual bool isLateMaterialResolving() const
Gets whether using late material resolving or not.
IlluminationRenderStage
Describes the stage of rendering when performing complex illumination.
virtual bool getShadowUseLightClipPlanes() const
Gets whether when using a built-in additive shadow mode, user clip planes should be used to restrict ...
Class that allows listening in on the various stages of SceneManager processing, so that custom behav...
vector< ShadowCaster * >::type ShadowCasterList
ShadowCameraSetupPtr mDefaultShadowCameraSetup
default shadow camera setup
virtual bool setOption(const String &strKey, const void *pValue)
Method for setting a specific option of the Scene Manager.
void prepare(bool lightInFrustum, const PlaneBoundedVolumeList *lightClipVolumes, const Light *light, const Camera *cam, ShadowCasterList *casterList, Real farDistSquared)
virtual size_t getShadowIndexBufferSize(void) const
Get the size of the shadow index buffer.
SceneManagerMetaData mMetaData
int type
Just a pointer for comparison, the light might destroyed for some reason.
SpecialCaseRenderQueueMode mSpecialCaseQueueMode
virtual void setShadowTextureFadeEnd(Real fadeEnd)
Sets the proportional distance at which texture shadows finish to fading out.
AnimationIterator getAnimationIterator(void)
Returns a specialised MapIterator over all animations in the scene.
Default implementation of SphereSceneQuery.
map< String, Camera * >::type CameraList
GpuProgramParametersSharedPtr mInfiniteExtrusionParams
size_t getShadowTextureCount(void) const
Get the number of the textures allocated for texture based shadows.
Abstract class defining a movable object in a scene.
map< String, SceneNode * >::type SceneNodeList
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:58
vector< EntityMaterialLodChangedEvent >::type EntityMaterialLodChangedEventList
List of entity material LOD changed events.
MovableObjectCollectionMap mMovableObjectCollectionMap
SkyPlaneGenParameters mSkyPlaneGenParameters
Inner helper class to implement the visitor pattern for rendering objects in a queue.
Pass * mShadowCasterPlainBlackPass
A pass designed to let us render shadow colour on white for texture shadows.
bool mSuppressRenderStateChanges
Suppress render state changes?
virtual SceneNode * getSkyDomeNode(void) const
Get the sky dome node, if enabled.
Class defining a single pass of a Technique (of a Material), i.e.
Definition: OgrePass.h:80
static uint32 USER_TYPE_MASK_LIMIT
User type mask limit.
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:135
Abstract class defining the interface all renderable objects must implement.
Implementation of a Quaternion, i.e.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
No fog. Duh.
Definition: OgreCommon.h:124
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList
A collection of billboards (faces which are always facing the given direction) with the same (default...
const LightList * manualLightList
Manual light list.
Allows the rendering of a chain of connected billboards.
virtual bool isSkyPlaneEnabled(void) const
Return whether a key plane is enabled.
LightInfoList mTestLightInfos
Class to hold a linear sequence of RenderQueueInvocation objects.
virtual bool getNormaliseNormalsOnScale() const
Get whether to automatically normalise normals on objects whenever they are scaled.
AnimationStateSet mAnimationStates
Shared pointer implementation used to share index buffers.
virtual const SkyPlaneGenParameters & getSkyPlaneGenParameters(void) const
Get the parameters used to construct the SkyPlane, if any.
virtual bool isShadowTechniqueModulative(void) const
Is there a modulative shadowing technique in use?
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:73
Default implementation of IntersectionSceneQuery.
virtual const SkyBoxGenParameters & getSkyBoxGenParameters(void) const
Get the parameters used to generate the current SkyBox, if any.
virtual bool getShadowTextureSelfShadow(void) const
Gets whether or not texture shadows attempt to self-shadow.
map< String, Animation * >::type AnimationList
Storage of animations, lookup by name.
Lowest level collection of renderables.
virtual bool isShadowTechniqueIntegrated(void) const
Is the shadow technique integrated into primary materials?
GpuProgramParametersSharedPtr mShadowTextureCustomReceiverVPParams
virtual void setShadowUseLightClipPlanes(bool enabled)
Sets whether when using a built-in additive shadow mode, user clip planes should be used to restrict ...
Allows the rendering of a simple 2D rectangle This class renders a simple 2D rectangle; this rectangl...
vector< Plane >::type PlaneList
Definition: OgrePlane.h:160
Struct containing information about a material LOD change event for entities.
String mName
Instance name.
ListenerList mListeners
virtual bool getCameraRelativeRendering() const
Get whether to use camera-relative co-ordinates when rendering, ie to always place the camera at the ...
AutoParamDataSource * mAutoParamDataSource
Utility class for calculating automatic parameters for gpu programs.
IlluminationRenderStage _getCurrentRenderStage()
Mask for integrated shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:202
virtual bool getDisplaySceneNodes(void) const
Returns true if all scene nodes axis are to be displayed.
static const Quaternion IDENTITY
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:190
Real minDistance
The closest a visible object is to the camera.
GpuProgramParametersSharedPtr mShadowTextureCustomCasterVPParams
No special illumination stage.
Quaternion mSkyDomeOrientation
RenderSystem::RenderSystemContext * rsContext
virtual void postUpdateSceneGraph(SceneManager *source, Camera *camera)
Called after updating the scene graph in this SceneManager.
virtual Real getShadowDirLightTextureOffset(void) const
Gets the proportional distance which a texture shadow which is generated from a directional light wil...
virtual uint32 getVisibilityMask(void)
Gets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is ...
virtual bool getOptionKeys(StringVector &refKeys)
Method for getting all the implementation-specific options of the scene manager.
Real mShadowTextureFadeEnd
As a proportion e.g. 0.6.
SpecialCaseRenderQueueMode
Enumeration of the possible modes allowed for processing the special case render queue list...
Mask for texture shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:208
CullingMode mPassCullingMode
Alternative listener class for dealing with RaySceneQuery.
ManualObject * mSkyBoxObj
const PlaneBoundedVolumeList * mLightClipVolumeList
virtual bool hasOption(const String &strKey) const
Method for verifying whether the scene manager has an implementation-specific option.
map< String, StaticGeometry * >::type StaticGeometryList
virtual bool isShadowTechniqueInUse(void) const
Is there any shadowing technique in use?
String mShadowTextureCustomReceiverVertexProgram
virtual void setShowDebugShadows(bool debug)
Enables / disables the rendering of debug information for shadows.
HardwareIndexBufferSharedPtr mShadowIndexBuffer
ShadowCamLightMapping mShadowCamLightMapping
Mask for stencil shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:205
InstanceManagerVec mDirtyInstanceMgrsTmp
NameGenerator mMovableNameGenerator
SphereSceneQuery * mShadowCasterSphereQuery
Alternative listener class for dealing with IntersectionSceneQuery.
unsigned long mLightClippingInfoMapFrameNumber
Real minDistanceInFrustum
The closest a object in the frustum regardless of visibility / shadow caster flags.
SceneMgrQueuedRenderableVisitor * mActiveQueuedRenderableVisitor
The active renderable visitor class - subclasses could override this.
PixelFormat
The pixel format used for images, textures, and render surfaces.
virtual bool _areRenderStateChangesSuppressed(void) const
Are render state changes suppressed?
Structure containing the configuration for one shadow texture.
CameraList mCameras
Central list of cameras - for easy memory management and lookup.
32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue like PF_A8R8G8B8, but alpha will get discarded
virtual size_t estimateWorldGeometry(const String &filename)
Estimate the number of loading stages required to load the named world geometry.
ShadowCasterList mShadowCasterList
RenderQueueListenerList mRenderQueueListeners
vector< MovableObjectLodChangedEvent >::type MovableObjectLodChangedEventList
List of movable object LOD changed events.
A sphere primitive, mostly used for bounds checking.
Definition: OgreSphere.h:51
virtual void setVisibilityMask(uint32 vmask)
Sets a mask which is bitwise 'and'ed with objects own visibility masks to determine if the object is ...
RenderSystem * mDestRenderSystem
The rendering system to send the scene to.
Defines an instance of a discrete, movable object based on a Mesh.
Definition: OgreEntity.h:82
Concrete IteratorWrapper for const access to the underlying container.
ShadowTechnique mShadowTechnique
CameraIterator getCameraIterator(void)
Returns a specialised MapIterator over all cameras in the scene.
Comparator for sorting lights relative to a point.
set< uint8 >::type SpecialCaseRenderQueueList
Pass * mShadowTextureCustomReceiverPass
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
LightList mShadowTextureCurrentCasterLightList
Abstract interface which classes must implement if they wish to receive events from the render queue...
virtual bool isSkyBoxEnabled(void) const
Return whether a skybox is enabled.
Subclass of BillboardChain which automatically leaves a trail behind one or more Node instances...
Struct containing information about a LOD change event for movable objects.
virtual void shadowTexturesUpdated(size_t numberOfShadowTextures)
Event raised after all shadow textures have been rendered into for all queues / targets but before an...
virtual bool getFlipCullingOnNegativeScale() const
Get whether to automatically flip the culling mode on objects whenever they are negatively scaled...
InstanceManagerMap mInstanceManagerMap
virtual void setSkyPlaneEnabled(bool enable)
Enables / disables a 'sky plane'.
Mask for modulative shadows (not for direct use, use SHADOWTYPE_ enum instead)
Definition: OgreCommon.h:199
MapIterator< CameraList > CameraIterator
size_t getShadowTextureCountPerLightType(Light::LightTypes type) const
Get the number of shadow textures is assigned for the given light type.
String mShadowTextureCustomCasterFragmentProgram
ShadowCasterSceneQueryListener * mShadowCasterQueryListener
TexturePtr mNullShadowTexture
String mShadowTextureCustomCasterVertexProgram
virtual bool getFindVisibleObjects(void)
Gets whether the SceneManager should search for visible objects, or whether they are being manually h...
virtual size_t estimateWorldGeometry(DataStreamPtr &stream, const String &typeName=StringUtil::BLANK)
Estimate the number of loading stages required to load the named world geometry.
vector< String >::type StringVector
virtual const SkyDomeGenParameters & getSkyDomeGenParameters(void) const
Get the parameters used to generate the current SkyDome, if any.
LightInfoList mCachedLightInfos
Visitor interface for items in a QueuedRenderableCollection.
virtual Real getShadowFarDistance(void) const
Gets the default maximum distance away from the camera that shadows will be visible.
virtual void setShadowDirLightTextureOffset(Real offset)
Sets the proportional distance which a texture shadow which is generated from a directional light wil...
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
vector< Camera * >::type ShadowTextureCameraList
unsigned short mLastLightLimit
Pass * mShadowTextureCustomCasterPass
map< String, MovableObjectCollection * >::type MovableObjectCollectionMap
AxisAlignedBox aabb
The axis-aligned bounds of the visible objects.
bool mCameraRelativeRendering
Whether to use camera-relative rendering.
virtual void setCameraRelativeRendering(bool rel)
Set whether to use camera-relative co-ordinates when rendering, ie to always place the camera at the ...
Quaternion orientation
Camera * mCameraInProgress
Camera in progress.
ColourValue mAmbientLight
Current ambient light, cached for RenderSystem.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Definition: OgreString.h:196
Struct containing information about a mesh LOD change event for entities.
const CameraList & getCameras() const
Returns a const version of the camera list.
virtual void setSkyDomeEnabled(bool enable)
Enables / disables a 'sky dome'.
Quaternion mSkyBoxOrientation
LightClippingInfoMap mLightClippingInfoMap
Default implementation of RaySceneQuery.
An abstraction of a viewport, i.e.
Definition: OgreViewport.h:57
'New' rendering operation using vertex buffers.
CamVisibleObjectsMap mCamVisibleObjectsMap
RenderObjectListenerList mRenderObjectListeners
uint32 mVisibilityMask
Visibility mask used to show / hide objects.
SceneNodeList mSceneNodes
Central list of SceneNodes - for easy memory management.
uint16 SceneTypeMask
Bitmask containing scene types.
ShadowTextureConfigList mShadowTextureConfigList
AutoTrackingSceneNodes mAutoTrackingSceneNodes
A interface class defining a listener which can be used to receive notifications of LOD events...
static uint32 WORLD_GEOMETRY_TYPE_MASK
Query type mask which will be used for world geometry.
vector< size_t >::type mShadowTextureIndexLightList
Array defining shadow texture index in light list.
SceneNode * mSkyDomeNode
MapIterator< MovableObjectMap > MovableObjectIterator
vector< ShadowTextureConfig >::type ShadowTextureConfigList
Pass * mShadowReceiverPass
A pass designed to let us render shadow receivers for texture shadows.
vector< RenderObjectListener * >::type RenderObjectListenerList
AnimationStateIterator getAnimationStateIterator(void)
Returns a specialised MapIterator over all animation states in the scene.
Texture * mCurrentShadowTexture
Rectangle2D * mFullScreenQuad
Default implementation of AxisAlignedBoxSceneQuery.
virtual bool getOption(const String &strKey, void *pDestValue)
Method for getting the value of an implementation-specific Scene Manager option.
#define OGRE_NEW
virtual void shadowTextureReceiverPreViewProj(Light *light, Frustum *frustum)
This event occurs just before the view & projection matrices are set for re-rendering a shadow receiv...
SpecialCaseRenderQueueList mSpecialCaseQueueList
Class to manage the scene object rendering queue.
Specialises the SceneQuery class for querying within an axis aligned box.
map< Light *, LightClippingInfo >::type LightClippingInfoMap
vector< RenderQueueListener * >::type RenderQueueListenerList
virtual bool isShadowTechniqueTextureBased(void) const
Is there a texture shadow based shadowing technique in use?
This is the main starting point for the new instancing system.
void setShadowTextureCountPerLightType(Light::LightTypes type, size_t count)
Set the number of shadow textures a light type uses.
InstancedGeometryList mInstancedGeometryList
virtual CompositorChain * _getActiveCompositorChain() const
Gets the active compositor chain of the current scene being rendered.
LightList mLightsAffectingFrustum
const AnimationList & getAnimations() const
Returns a const version of the animation list.
set< LodListener * >::type LodListenerSet
Set of registered LOD listeners.
ColourValue mShadowColour
Specialises the SceneQuery class for querying within a plane-bounded volume.
virtual void setFlipCullingOnNegativeScale(bool n)
Set whether to automatically flip the culling mode on objects whenever they are negatively scaled...
AxisAlignedBoxSceneQuery * mShadowCasterAABBQuery
Default implementation of PlaneBoundedVolumeListSceneQuery.
ClipResult
Generic result of clipping.
Definition: OgreCommon.h:740
Structure for holding a position & orientation pair.
_StringBase String
Real maxDistance
The farthest a visible objects is from the camera.
virtual void setShadowCasterRenderBackFaces(bool bf)
Sets whether or not shadow casters should be rendered into shadow textures using their back faces rat...
virtual void setFindVisibleObjects(bool find)
Sets whether the SceneManager should search for visible objects, or whether they are being manually h...
Real range
Use int instead of Light::LightTypes to avoid header file dependence.
Separate SceneQuery class to query for pairs of objects which are possibly intersecting one another...
unsigned short uint16
Definition: OgrePlatform.h:345
map< const Camera *, const Light * >::type ShadowCamLightMapping
ShadowCamera to light mapping.
virtual SceneNode * getSkyBoxNode(void) const
Get the skybox node, if enabled.
CompositorChain * mActiveCompositorChain
virtual void postFindVisibleObjects(SceneManager *source, IlluminationRenderStage irs, Viewport *v)
Called after searching for visible objects in this SceneManager.
This optional class allows you to receive per-result callbacks from SceneQuery executions instead of ...
bool mShadowTextureSelfShadow
As a proportion e.g. 0.9.
Concrete IteratorWrapper for nonconst access to the underlying container.
Vector3 position
Sets to zero if directional light.
SceneManager * targetSceneMgr
Target SM to send renderables to.
Defines the functionality of a 3D API.
virtual bool _areShadowsSuppressed(void) const
Are shadows suppressed?
Abstract class representing a Texture resource.
Definition: OgreTexture.h:102
virtual void setLateMaterialResolving(bool isLate)
Sets whether to use late material resolving or not.
An animation sequence.
Definition: OgreAnimation.h:92
virtual AutoParamDataSource * createAutoParamDataSource(void) const
Internal method for creating the AutoParamDataSource instance.
Structure collecting together information about the visible objects that have been discovered in a sc...
LodListenerSet mLodListeners
Specialises the SceneQuery class for querying along a ray.
bool mShowBoundingBoxes
Flag that indicates if all of the scene node's bounding boxes should be shown as a wireframe...
Structure containing information about a scene manager.
InstanceManagerVec mDirtyInstanceManagers
virtual const SceneManagerMetaData & getMetaData(void) const
Get information about the SceneManager type created by this factory.
Cached light information, used to tracking light's changes.
const String & getName(void) const
Return the instance name of this SceneManager.
set< SceneNode * >::type AutoTrackingSceneNodes
Autotracking scene nodes.
static uint32 STATICGEOMETRY_TYPE_MASK
Query type mask which will be used for StaticGeometry.
static uint32 LIGHT_TYPE_MASK
Query type mask which will be used for lights.
virtual ShadowTechnique getShadowTechnique(void) const
Gets the current shadow technique.
vector< EntityMeshLodChangedEvent >::type EntityMeshLodChangedEventList
List of entity mesh LOD changed events.
String description
A text description of the scene manager.
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
Class which will create instances of a given SceneManager.
This utility class is used to hold the information used to generate the matrices and other informatio...
virtual void setSkyBoxEnabled(bool enable)
Enables / disables a 'sky box'.
EntityMeshLodChangedEventList mEntityMeshLodChangedEvents
virtual bool getShowDebugShadows(void) const
Are debug shadows shown?
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
bool mDisplayNodes
Flag indicating whether SceneNodes will be rendered as a set of 3 axes.
GpuProgramParametersSharedPtr mShadowTextureCustomReceiverFPParams
EntityMaterialLodChangedEventList mEntityMaterialLodChangedEvents