# OgreSceneManager.h Source File - OGRE Documentation

# OgreSceneManager.h

Go to the documentation of this file.

    00001 /*-------------------------------------------------------------------------
    00002 This source file is a part of OGRE
    00003 (Object-oriented Graphics Rendering Engine)
    00004
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2005 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This library is free software; you can redistribute it and/or modify it
    00011 under the terms of the GNU Lesser General Public License (LGPL) as
    00012 published by the Free Software Foundation; either version 2.1 of the
    00013 License, or (at your option) any later version.
    00014
    00015 This library is distributed in the hope that it will be useful, but
    00016 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    00017 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    00018 License for more details.
    00019
    00020 You should have received a copy of the GNU Lesser General Public License
    00021 along with this library; if not, write to the Free Software Foundation,
    00022 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA or go to
    00023 http://www.gnu.org/copyleft/lesser.txt
    00024 -------------------------------------------------------------------------*/
    00025 #ifndef __SceneManager_H__
    00026 #define __SceneManager_H__
    00027
    00028 // Precompiler options
    00029 #include "OgrePrerequisites.h"
    00030
    00031 #include "OgreString.h"
    00032 #include "OgreSceneNode.h"
    00033 #include "OgrePlane.h"
    00034 #include "OgreQuaternion.h"
    00035 #include "OgreColourValue.h"
    00036 #include "OgreCommon.h"
    00037 #include "OgreRenderQueue.h"
    00038 #include "OgreAnimationState.h"
    00039 #include "OgreSceneQuery.h"
    00040 #include "OgreAutoParamDataSource.h"
    00041 #include "OgreAnimationState.h"
    00042 #include "OgreRenderQueue.h"
    00043 #include "OgreRenderQueueSortingGrouping.h"
    00044 #include "OgreRectangle2D.h"
    00045
    00046 namespace Ogre {
    00047
    00049     struct ViewPoint
    00050     {
    00051         Vector3 position;
    00052         Quaternion orientation;
    00053     };
    00054
    00055     // Forward declarations
    00056     class DefaultIntersectionSceneQuery;
    00057     class DefaultRaySceneQuery;
    00058     class DefaultSphereSceneQuery;
    00059     class DefaultAxisAlignedBoxSceneQuery;
    00060
    00076     class _OgreExport SceneManager
    00077     {
    00078         friend class DefaultIntersectionSceneQuery;
    00079         friend class DefaultRaySceneQuery;
    00080         friend class DefaultSphereSceneQuery;
    00081         friend class DefaultAxisAlignedBoxSceneQuery;
    00082         friend class DefaultPlaneBoundedVolumeListSceneQuery;
    00083     public:
    00085         static unsigned long WORLD_GEOMETRY_QUERY_MASK;
    00088         struct materialLess
    00089         {
    00090             _OgreExport bool operator()(const Material* x, const Material* y) const;
    00091         };
    00093         struct lightLess
    00094         {
    00095             _OgreExport bool operator()(const Light* a, const Light* b) const;
    00096         };
    00097
    00099         enum IlluminationRenderStage
    00100         {
    00102             IRS_NONE,
    00104             IRS_AMBIENT,
    00106             IRS_PER_LIGHT,
    00108             IRS_DECAL,
    00110             IRS_RENDER_TO_TEXTURE,
    00112             IRS_RENDER_MODULATIVE_PASS
    00113         };
    00114
    00119         enum SpecialCaseRenderQueueMode
    00120         {
    00122             SCRQM_INCLUDE,
    00124             SCRQM_EXCLUDE
    00125         };
    00126     protected:
    00127
    00129         RenderQueue* mRenderQueue;
    00130
    00132         ColourValue mAmbientLight;
    00133
    00135         RenderSystem *mDestRenderSystem;
    00136
    00137         typedef std::map<String, Camera* > CameraList;
    00138
    00141         CameraList mCameras;
    00142
    00143         typedef std::map<String, Light* > SceneLightList;
    00144
    00147         SceneLightList mLights;
    00148
    00149
    00150         typedef std::map<String, Entity* > EntityList;
    00151
    00154         EntityList mEntities;
    00155
    00156         typedef std::map<String, BillboardSet* > BillboardSetList;
    00157
    00160         BillboardSetList mBillboardSets;
    00161
    00162         typedef std::map<String, StaticGeometry* > StaticGeometryList;
    00163         StaticGeometryList mStaticGeometryList;
    00164
    00165         typedef std::map<String, SceneNode*> SceneNodeList;
    00166
    00173         SceneNodeList mSceneNodes;
    00174
    00176         Camera* mCameraInProgress;
    00178         Viewport* mCurrentViewport;
    00179
    00181         SceneNode* mSceneRoot;
    00182
    00184         typedef std::set<SceneNode*> AutoTrackingSceneNodes;
    00185         AutoTrackingSceneNodes mAutoTrackingSceneNodes;
    00186
    00187         // Sky params
    00188         // Sky plane
    00189         Entity* mSkyPlaneEntity;
    00190         Entity* mSkyDomeEntity[5];
    00191         Entity* mSkyBoxEntity[6];
    00192
    00193         SceneNode* mSkyPlaneNode;
    00194         SceneNode* mSkyDomeNode;
    00195         SceneNode* mSkyBoxNode;
    00196
    00197         bool mSkyPlaneEnabled;
    00198         bool mSkyPlaneDrawFirst;
    00199         Plane mSkyPlane;
    00200         // Sky box
    00201         bool mSkyBoxEnabled;
    00202         bool mSkyBoxDrawFirst;
    00203         Quaternion mSkyBoxOrientation;
    00204         // Sky dome
    00205         bool mSkyDomeEnabled;
    00206         bool mSkyDomeDrawFirst;
    00207         Quaternion mSkyDomeOrientation;
    00208         // Fog
    00209         FogMode mFogMode;
    00210         ColourValue mFogColour;
    00211         Real mFogStart;
    00212         Real mFogEnd;
    00213         Real mFogDensity;
    00214
    00215         typedef std::set<RenderQueueGroupID> SpecialCaseRenderQueueList;
    00216         SpecialCaseRenderQueueList mSpecialCaseQueueList;
    00217         SpecialCaseRenderQueueMode mSpecialCaseQueueMode;
    00218         RenderQueueGroupID mWorldGeometryRenderQueue;
    00219
    00224         virtual void initRenderQueue(void);
    00226         virtual RenderQueue* getRenderQueue(void);
    00234         virtual Pass* setPass(Pass* pass);
    00236         Pass* mShadowCasterPlainBlackPass;
    00238         Pass* mShadowReceiverPass;
    00248         Pass* deriveShadowCasterPass(Pass* pass);
    00257         Pass* deriveShadowReceiverPass(Pass* pass);
    00258
    00265         bool validatePassForRendering(Pass* pass);
    00266
    00273         bool validateRenderableForRendering(Pass* pass, Renderable* rend);
    00274
    00275         enum BoxPlane
    00276         {
    00277             BP_FRONT = 0,
    00278             BP_BACK = 1,
    00279             BP_LEFT = 2,
    00280             BP_RIGHT = 3,
    00281             BP_UP = 4,
    00282             BP_DOWN = 5
    00283         };
    00284
    00285         /* Internal utility method for creating the planes of a skybox.
    00286         */
    00287         MeshPtr createSkyboxPlane(
    00288             BoxPlane bp,
    00289             Real distance,
    00290             const Quaternion& orientation,
    00291             const String& groupName);
    00292
    00293         /* Internal utility method for creating the planes of a skydome.
    00294         */
    00295         MeshPtr createSkydomePlane(
    00296             BoxPlane bp,
    00297             Real curvature, Real tiling, Real distance,
    00298             const Quaternion& orientation,
    00299             int xsegments, int ysegments, int ySegmentsToKeep,
    00300             const String& groupName);
    00301
    00302         // Flag indicating whether SceneNodes will be rendered as a set of 3 axes
    00303         bool mDisplayNodes;
    00304
    00306         typedef std::map<String, Animation*> AnimationList;
    00307         AnimationList mAnimationsList;
    00308         AnimationStateSet mAnimationStates;
    00309
    00312         void useRenderableViewProjMode(Renderable* pRend);
    00313
    00315         bool mCamChanged;
    00316
    00317         typedef std::vector<RenderQueueListener*> RenderQueueListenerList;
    00318         RenderQueueListenerList mRenderQueueListeners;
    00319
    00321         bool fireRenderQueueStarted(RenderQueueGroupID id);
    00323         bool fireRenderQueueEnded(RenderQueueGroupID id);
    00324
    00326         virtual void setViewport(Viewport *vp);
    00327
    00329         bool mShowBoundingBoxes;
    00330
    00343         virtual void renderSingleObject(Renderable* rend, Pass* pass, bool doLightIteration,
    00344             const LightList* manualLightList = 0);
    00345
    00347         AutoParamDataSource mAutoParamDataSource;
    00348
    00349         ShadowTechnique mShadowTechnique;
    00350         bool mDebugShadows;
    00351         ColourValue mShadowColour;
    00352         Pass* mShadowDebugPass;
    00353         Pass* mShadowStencilPass;
    00354         Pass* mShadowModulativePass;
    00355         bool mShadowMaterialInitDone;
    00356         LightList mLightsAffectingFrustum;
    00357         HardwareIndexBufferSharedPtr mShadowIndexBuffer;
    00358         size_t mShadowIndexBufferSize;
    00359         Rectangle2D* mFullScreenQuad;
    00360         Real mShadowDirLightExtrudeDist;
    00361         IlluminationRenderStage mIlluminationStage;
    00362         unsigned short mShadowTextureSize;
    00363         unsigned short mShadowTextureCount;
    00364         PixelFormat mShadowTextureFormat;
    00365         typedef std::vector<RenderTexture*> ShadowTextureList;
    00366         ShadowTextureList mShadowTextures;
    00367         RenderTexture* mCurrentShadowTexture;
    00368         bool mShadowUseInfiniteFarPlane;
    00375         virtual void findLightsAffectingFrustum(const Camera* camera);
    00377         virtual void initShadowVolumeMaterials(void);
    00379         virtual void createShadowTextures(unsigned short size, unsigned short count,
    00380             PixelFormat fmt);
    00382         virtual void prepareShadowTextures(Camera* cam, Viewport* vp);
    00383
    00389         virtual void renderShadowVolumesToStencil(const Light* light, const Camera* cam);
    00395         virtual void setShadowVolumeStencilState(bool secondpass, bool zfail, bool twosided);
    00397         void renderShadowVolumeObjects(ShadowCaster::ShadowRenderableListIterator iShadowRenderables,
    00398             Pass* pass, const LightList *manualLightList, unsigned long flags,
    00399             bool secondpass, bool zfail, bool twosided);
    00400         typedef std::vector<ShadowCaster*> ShadowCasterList;
    00401         ShadowCasterList mShadowCasterList;
    00402         SphereSceneQuery* mShadowCasterSphereQuery;
    00403         AxisAlignedBoxSceneQuery* mShadowCasterAABBQuery;
    00404         Real mShadowFarDist;
    00405         Real mShadowFarDistSquared;
    00406         Real mShadowTextureOffset; // proportion of texture offset in view direction e.g. 0.4
    00407         Real mShadowTextureFadeStart; // as a proportion e.g. 0.6
    00408         Real mShadowTextureFadeEnd; // as a proportion e.g. 0.9
    00409         bool mShadowTextureSelfShadow;
    00410         Pass* mShadowTextureCustomCasterPass;
    00411         Pass* mShadowTextureCustomReceiverPass;
    00412         String mShadowTextureCustomCasterVertexProgram;
    00413         String mShadowTextureCustomReceiverVertexProgram;
    00414         GpuProgramParametersSharedPtr mShadowTextureCustomCasterVPParams;
    00415         GpuProgramParametersSharedPtr mShadowTextureCustomReceiverVPParams;
    00416         bool mShadowTextureCasterVPDirty;
    00417         bool mShadowTextureReceiverVPDirty;
    00418
    00419
    00420         GpuProgramParametersSharedPtr mInfiniteExtrusionParams;
    00421         GpuProgramParametersSharedPtr mFiniteExtrusionParams;
    00422
    00424         class _OgreExport ShadowCasterSceneQueryListener : public SceneQueryListener
    00425         {
    00426         protected:
    00427             SceneManager* mSceneMgr;
    00428             ShadowCasterList* mCasterList;
    00429             bool mIsLightInFrustum;
    00430             const PlaneBoundedVolumeList* mLightClipVolumeList;
    00431             const Camera* mCamera;
    00432             const Light* mLight;
    00433             Real mFarDistSquared;
    00434         public:
    00435             ShadowCasterSceneQueryListener(SceneManager* sm) : mSceneMgr(sm),
    00436                 mCasterList(0), mIsLightInFrustum(false), mLightClipVolumeList(0),
    00437                 mCamera(0) {}
    00438             // Prepare the listener for use with a set of parameters
    00439             void prepare(bool lightInFrustum,
    00440                 const PlaneBoundedVolumeList* lightClipVolumes,
    00441                 const Light* light, const Camera* cam, ShadowCasterList* casterList,
    00442                 Real farDistSquared)
    00443             {
    00444                 mCasterList = casterList;
    00445                 mIsLightInFrustum = lightInFrustum;
    00446                 mLightClipVolumeList = lightClipVolumes;
    00447                 mCamera = cam;
    00448                 mLight = light;
    00449                 mFarDistSquared = farDistSquared;
    00450             }
    00451             bool queryResult(MovableObject* object);
    00452             bool queryResult(SceneQuery::WorldFragment* fragment);
    00453         };
    00454
    00455         ShadowCasterSceneQueryListener* mShadowCasterQueryListener;
    00456
    00463         virtual const ShadowCasterList& findShadowCastersForLight(const Light* light,
    00464             const Camera* camera);
    00467         virtual void renderQueueGroupObjects(RenderQueueGroup* group);
    00469         virtual void renderBasicQueueGroupObjects(RenderQueueGroup* pGroup);
    00471         virtual void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* group);
    00473         virtual void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* group);
    00475         virtual void renderTextureShadowCasterQueueGroupObjects(RenderQueueGroup* group);
    00477         virtual void renderTextureShadowReceiverQueueGroupObjects(RenderQueueGroup* group);
    00479         virtual void renderModulativeTextureShadowedQueueGroupObjects(RenderQueueGroup* group);
    00481         virtual void renderObjects(const RenderPriorityGroup::SolidRenderablePassMap& objs,
    00482             bool doLightIteration, const LightList* manualLightList = 0);
    00484         virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,
    00485             bool doLightIteration, const LightList* manualLightList = 0);
    00491         virtual void renderTransparentShadowCasterObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,
    00492             bool doLightIteration, const LightList* manualLightList = 0);
    00493
    00494     public:
    00497         SceneManager();
    00498
    00501         virtual ~SceneManager();
    00502
    00510         virtual Camera* createCamera(const String& name);
    00511
    00514         virtual Camera* getCamera(const String& name);
    00515
    00524         virtual void removeCamera(Camera *cam);
    00525
    00531         virtual void removeCamera(const String& name);
    00532
    00535         virtual void removeAllCameras(void);
    00536
    00547         virtual Light* createLight(const String& name);
    00548
    00551         virtual Light* getLight(const String& name);
    00552
    00557         virtual void removeLight(const String& name);
    00558
    00563         virtual void removeLight(Light* light);
    00566         virtual void removeAllLights(void);
    00567
    00587         virtual void _populateLightList(const Vector3& position, Real radius, LightList& destList);
    00588
    00589
    00606         virtual SceneNode* createSceneNode(void);
    00607
    00622         virtual SceneNode* createSceneNode(const String& name);
    00623
    00630         virtual void destroySceneNode(const String& name);
    00631
    00647         virtual SceneNode* getRootSceneNode(void) const;
    00648
    00655         virtual SceneNode* getSceneNode(const String& name) const;
    00656
    00664         virtual Entity* createEntity(const String& entityName, const String& meshName);
    00665
    00672         enum PrefabType {
    00673             PT_PLANE
    00674         };
    00675
    00682         virtual Entity* createEntity(const String& entityName, PrefabType ptype);
    00684         virtual Entity* getEntity(const String& name);
    00685
    00694         virtual void removeEntity(Entity* ent);
    00695
    00704         virtual void removeEntity(const String& name);
    00705
    00715         virtual void removeAllEntities(void);
    00716
    00722         virtual void clearScene(void);
    00723
    00736         void setAmbientLight(const ColourValue& colour);
    00737
    00740         const ColourValue& getAmbientLight(void) const;
    00741
    00757         virtual void setWorldGeometry(const String& filename);
    00758
    00771         virtual size_t estimateWorldGeometry(const String& filename) { return 0; }
    00772
    00787         virtual ViewPoint getSuggestedViewpoint(bool random = false);
    00788
    00802         virtual bool setOption( const String& strKey, const void* pValue ) { return false; }
    00803
    00817         virtual bool getOption( const String& strKey, void* pDestValue ) { return false; }
    00818
    00828         virtual bool hasOption( const String& strKey ) const { return false; }
    00843         virtual bool getOptionValues( const String& strKey, StringVector& refValueList ) { return false; }
    00844
    00851         virtual bool getOptionKeys( StringVector& refKeys ) { return false; }
    00852
    00861         virtual void _updateSceneGraph(Camera* cam);
    00862
    00874         virtual void _findVisibleObjects(Camera* cam, bool onlyShadowCasters);
    00875
    00880         virtual void _applySceneAnimations(void);
    00881
    00884         virtual void _renderVisibleObjects(void);
    00885
    00899         virtual void _renderScene(Camera* camera, Viewport* vp, bool includeOverlays);
    00900
    00904         virtual void _queueSkiesForRendering(Camera* cam);
    00905
    00906
    00907
    00916         virtual void _setDestinationRenderSystem(RenderSystem* sys);
    00917
    00970         virtual void setSkyPlane(
    00971             bool enable,
    00972             const Plane& plane, const String& materialName, Real scale = 1000,
    00973             Real tiling = 10, bool drawFirst = true, Real bow = 0,
    00974             int xsegments = 1, int ysegments = 1,
    00975             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    00976
    01018         virtual void setSkyBox(
    01019             bool enable, const String& materialName, Real distance = 5000,
    01020             bool drawFirst = true, const Quaternion& orientation = Quaternion::IDENTITY,
    01021             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    01022
    01078         virtual void setSkyDome(
    01079             bool enable, const String& materialName, Real curvature = 10,
    01080             Real tiling = 8, Real distance = 4000, bool drawFirst = true,
    01081             const Quaternion& orientation = Quaternion::IDENTITY,
    01082             int xsegments = 16, int ysegments = 16, int ysegments_keep = -1,
    01083             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    01084
    01109         void setFog(
    01110             FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White,
    01111             Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0);
    01112
    01115         virtual FogMode getFogMode(void) const;
    01116
    01119         virtual const ColourValue& getFogColour(void) const;
    01120
    01123         virtual Real getFogStart(void) const;
    01124
    01127         virtual Real getFogEnd(void) const;
    01128
    01131         virtual Real getFogDensity(void) const;
    01132
    01133
    01151         virtual BillboardSet* createBillboardSet(const String& name, unsigned int poolSize = 20);
    01152
    01155         virtual BillboardSet* getBillboardSet(const String& name);
    01156
    01163         virtual void removeBillboardSet(BillboardSet* set);
    01164
    01171         virtual void removeBillboardSet(const String& name);
    01172
    01182         virtual void removeAllBillboardSets(void);
    01183
    01191         virtual void setDisplaySceneNodes(bool display);
    01192
    01213         virtual Animation* createAnimation(const String& name, Real length);
    01214
    01216         virtual Animation* getAnimation(const String& name) const;
    01217
    01223         virtual void destroyAnimation(const String& name);
    01224
    01226         virtual void destroyAllAnimations(void);
    01227
    01251         virtual AnimationState* createAnimationState(const String& animName);
    01252
    01254         virtual AnimationState* getAnimationState(const String& animName);
    01255
    01261         virtual void destroyAnimationState(const String& name);
    01262
    01264         virtual void destroyAllAnimationStates(void);
    01265
    01289         virtual void manualRender(RenderOperation* rend, Pass* pass, Viewport* vp,
    01290             const Matrix4& worldMatrix, const Matrix4& viewMatrix, const Matrix4& projMatrix,
    01291             bool doBeginEndFrame = false) ;
    01292
    01296         virtual void addRenderQueueListener(RenderQueueListener* newListener);
    01297
    01299         virtual void removeRenderQueueListener(RenderQueueListener* delListener);
    01300
    01314         virtual void addSpecialCaseRenderQueue(RenderQueueGroupID qid);
    01320         virtual void removeSpecialCaseRenderQueue(RenderQueueGroupID qid);
    01324         virtual void clearSpecialCaseRenderQueues(void);
    01329         virtual void setSpecialCaseRenderQueueMode(SpecialCaseRenderQueueMode mode);
    01331         virtual SpecialCaseRenderQueueMode getSpecialCaseRenderQueueMode(void);
    01338         virtual bool isRenderQueueToBeProcessed(RenderQueueGroupID qid);
    01339
    01355         virtual void setWorldGeometryRenderQueue(RenderQueueGroupID qid);
    01366         virtual RenderQueueGroupID getWorldGeometryRenderQueue(void);
    01367
    01369         virtual void showBoundingBoxes(bool bShow);
    01370
    01372         virtual bool getShowBoundingBoxes() const;
    01373
    01375         virtual void _notifyAutotrackingSceneNode(SceneNode* node, bool autoTrack);
    01376
    01377
    01390         virtual AxisAlignedBoxSceneQuery*
    01391             createAABBQuery(const AxisAlignedBox& box, unsigned long mask = 0xFFFFFFFF);
    01404         virtual SphereSceneQuery*
    01405             createSphereQuery(const Sphere& sphere, unsigned long mask = 0xFFFFFFFF);
    01418         virtual PlaneBoundedVolumeListSceneQuery*
    01419             createPlaneBoundedVolumeQuery(const PlaneBoundedVolumeList& volumes, unsigned long mask = 0xFFFFFFFF);
    01420
    01421
    01434         virtual RaySceneQuery*
    01435             createRayQuery(const Ray& ray, unsigned long mask = 0xFFFFFFFF);
    01436         //PyramidSceneQuery* createPyramidQuery(const Pyramid& p, unsigned long mask = 0xFFFFFFFF);
    01448         virtual IntersectionSceneQuery*
    01449             createIntersectionQuery(unsigned long mask = 0xFFFFFFFF);
    01450
    01452         virtual void destroyQuery(SceneQuery* query);
    01453
    01454         typedef MapIterator<SceneLightList> LightIterator;
    01455         typedef MapIterator<EntityList> EntityIterator;
    01456         typedef MapIterator<CameraList> CameraIterator;
    01457         typedef MapIterator<BillboardSetList> BillboardSetIterator;
    01458         typedef MapIterator<AnimationList> AnimationIterator;
    01459
    01461         LightIterator getLightIterator(void) {
    01462             return LightIterator(mLights.begin(), mLights.end());
    01463         }
    01465         EntityIterator getEntityIterator(void) {
    01466             return EntityIterator(mEntities.begin(), mEntities.end());
    01467         }
    01469         CameraIterator getCameraIterator(void) {
    01470             return CameraIterator(mCameras.begin(), mCameras.end());
    01471         }
    01473         BillboardSetIterator getBillboardSetIterator(void) {
    01474             return BillboardSetIterator(mBillboardSets.begin(), mBillboardSets.end());
    01475         }
    01477         AnimationIterator getAnimationIterator(void) {
    01478             return AnimationIterator(mAnimationsList.begin(), mAnimationsList.end());
    01479         }
    01481         AnimationStateIterator getAnimationStateIterator(void) {
    01482             return AnimationStateIterator(mAnimationStates.begin(), mAnimationStates.end());
    01483         }
    01484
    01517         virtual void setShadowTechnique(ShadowTechnique technique);
    01518
    01520         virtual ShadowTechnique getShadowTechnique(void) const { return mShadowTechnique; }
    01521
    01523         virtual void setShowDebugShadows(bool debug) { mDebugShadows = debug; }
    01525         virtual bool getShowDebugShadows(void ) const { return mDebugShadows; }
    01526
    01533         virtual void setShadowColour(const ColourValue& colour);
    01540         virtual const ColourValue& getShadowColour(void) const;
    01552         virtual void setShadowDirectionalLightExtrusionDistance(Real dist);
    01555         virtual Real getShadowDirectionalLightExtrusionDistance(void) const;
    01571         virtual void setShadowFarDistance(Real distance);
    01575         virtual Real getShadowFarDistance(void) const
    01576         { return mShadowFarDist; }
    01577
    01603         virtual void setShadowIndexBufferSize(size_t size);
    01605         virtual size_t getShadowIndexBufferSize(void) const
    01606         { return mShadowIndexBufferSize; }
    01613         virtual void setShadowTextureSize(unsigned short size);
    01615         unsigned short getShadowTextureSize(void) const {return mShadowTextureSize; }
    01625         virtual void setShadowTexturePixelFormat(PixelFormat fmt);
    01627         PixelFormat getShadowTexturePixelFormat(void) const {return mShadowTextureFormat; }
    01635         virtual void setShadowTextureCount(unsigned short count);
    01637         unsigned short getShadowTextureCount(void) const {return mShadowTextureCount; }
    01644         virtual void setShadowTextureSettings(unsigned short size, unsigned short count,
    01645             PixelFormat fmt = PF_X8R8G8B8);
    01660         virtual void setShadowDirLightTextureOffset(Real offset) { mShadowTextureOffset = offset;}
    01668         virtual void setShadowTextureFadeStart(Real fadeStart)
    01669         { mShadowTextureFadeStart = fadeStart; }
    01677         virtual void setShadowTextureFadeEnd(Real fadeEnd)
    01678         { mShadowTextureFadeEnd = fadeEnd; }
    01679
    01692         virtual void setShadowTextureSelfShadow(bool selfShadow)
    01693         { mShadowTextureSelfShadow = selfShadow; }
    01695         virtual bool getShadowTextureSelfShadow(void) const
    01696         { return mShadowTextureSelfShadow; }
    01717         virtual void setShadowTextureCasterMaterial(const String& name);
    01739         virtual void setShadowTextureReceiverMaterial(const String& name);
    01740
    01777         virtual void setShadowUseInfiniteFarPlane(bool enable) {
    01778             mShadowUseInfiniteFarPlane = enable; }
    01779
    01789         virtual StaticGeometry* createStaticGeometry(const String& name);
    01791         virtual StaticGeometry* getStaticGeometry(const String& name) const;
    01793         virtual void removeStaticGeometry(StaticGeometry* geom);
    01795         virtual void removeStaticGeometry(const String& name);
    01797         virtual void removeAllStaticGeometry(void);
    01798
    01799
    01800     };
    01801
    01803     class _OgreExport DefaultIntersectionSceneQuery :
    01804         public IntersectionSceneQuery
    01805     {
    01806     public:
    01807         DefaultIntersectionSceneQuery(SceneManager* creator);
    01808         ~DefaultIntersectionSceneQuery();
    01809
    01811         void execute(IntersectionSceneQueryListener* listener);
    01812     };
    01813
    01815     class _OgreExport DefaultRaySceneQuery : public RaySceneQuery
    01816     {
    01817     public:
    01818         DefaultRaySceneQuery(SceneManager* creator);
    01819         ~DefaultRaySceneQuery();
    01820
    01822         void execute(RaySceneQueryListener* listener);
    01823     };
    01825     class _OgreExport DefaultSphereSceneQuery : public SphereSceneQuery
    01826     {
    01827     public:
    01828         DefaultSphereSceneQuery(SceneManager* creator);
    01829         ~DefaultSphereSceneQuery();
    01830
    01832         void execute(SceneQueryListener* listener);
    01833     };
    01835     class _OgreExport DefaultPlaneBoundedVolumeListSceneQuery : public PlaneBoundedVolumeListSceneQuery
    01836     {
    01837     public:
    01838         DefaultPlaneBoundedVolumeListSceneQuery(SceneManager* creator);
    01839         ~DefaultPlaneBoundedVolumeListSceneQuery();
    01840
    01842         void execute(SceneQueryListener* listener);
    01843     };
    01845     class _OgreExport DefaultAxisAlignedBoxSceneQuery : public AxisAlignedBoxSceneQuery
    01846     {
    01847     public:
    01848         DefaultAxisAlignedBoxSceneQuery(SceneManager* creator);
    01849         ~DefaultAxisAlignedBoxSceneQuery();
    01850
    01852         void execute(SceneQueryListener* listener);
    01853     };
    01854
    01855
    01856
    01857 } // Namespace
    01858
    01859
    01860
    01861 #endif

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Sep 25 17:36:00 2005