# 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);
    00232         virtual Pass* setPass(Pass* pass);
    00234         Pass* mShadowCasterPlainBlackPass;
    00236         Pass* mShadowReceiverPass;
    00246         Pass* deriveShadowCasterPass(Pass* pass);
    00255         Pass* deriveShadowReceiverPass(Pass* pass);
    00256
    00263         bool validatePassForRendering(Pass* pass);
    00264
    00271         bool validateRenderableForRendering(Pass* pass, Renderable* rend);
    00272
    00273         enum BoxPlane
    00274         {
    00275             BP_FRONT = 0,
    00276             BP_BACK = 1,
    00277             BP_LEFT = 2,
    00278             BP_RIGHT = 3,
    00279             BP_UP = 4,
    00280             BP_DOWN = 5
    00281         };
    00282
    00283         /* Internal utility method for creating the planes of a skybox.
    00284         */
    00285         MeshPtr createSkyboxPlane(
    00286             BoxPlane bp,
    00287             Real distance,
    00288             const Quaternion& orientation,
    00289             const String& groupName);
    00290
    00291         /* Internal utility method for creating the planes of a skydome.
    00292         */
    00293         MeshPtr createSkydomePlane(
    00294             BoxPlane bp,
    00295             Real curvature, Real tiling, Real distance,
    00296             const Quaternion& orientation,
    00297             int xsegments, int ysegments, int ySegmentsToKeep,
    00298             const String& groupName);
    00299
    00300         // Flag indicating whether SceneNodes will be rendered as a set of 3 axes
    00301         bool mDisplayNodes;
    00302
    00304         typedef std::map<String, Animation*> AnimationList;
    00305         AnimationList mAnimationsList;
    00306         AnimationStateSet mAnimationStates;
    00307
    00310         void useRenderableViewProjMode(Renderable* pRend);
    00311
    00313         bool mCamChanged;
    00314
    00315         typedef std::vector<RenderQueueListener*> RenderQueueListenerList;
    00316         RenderQueueListenerList mRenderQueueListeners;
    00317
    00319         bool fireRenderQueueStarted(RenderQueueGroupID id);
    00321         bool fireRenderQueueEnded(RenderQueueGroupID id);
    00322
    00324         virtual void setViewport(Viewport *vp);
    00325
    00327         bool mShowBoundingBoxes;
    00328
    00341         virtual void renderSingleObject(Renderable* rend, Pass* pass, bool doLightIteration,
    00342             const LightList* manualLightList = 0);
    00343
    00345         AutoParamDataSource mAutoParamDataSource;
    00346
    00347         ShadowTechnique mShadowTechnique;
    00348         bool mDebugShadows;
    00349         ColourValue mShadowColour;
    00350         Pass* mShadowDebugPass;
    00351         Pass* mShadowStencilPass;
    00352         Pass* mShadowModulativePass;
    00353         bool mShadowMaterialInitDone;
    00354         LightList mLightsAffectingFrustum;
    00355         HardwareIndexBufferSharedPtr mShadowIndexBuffer;
    00356         size_t mShadowIndexBufferSize;
    00357         Rectangle2D* mFullScreenQuad;
    00358         Real mShadowDirLightExtrudeDist;
    00359         IlluminationRenderStage mIlluminationStage;
    00360         unsigned short mShadowTextureSize;
    00361         unsigned short mShadowTextureCount;
    00362         PixelFormat mShadowTextureFormat;
    00363         typedef std::vector<RenderTexture*> ShadowTextureList;
    00364         ShadowTextureList mShadowTextures;
    00365         RenderTexture* mCurrentShadowTexture;
    00366         bool mShadowUseInfiniteFarPlane;
    00373         virtual void findLightsAffectingFrustum(const Camera* camera);
    00375         virtual void initShadowVolumeMaterials(void);
    00377         virtual void createShadowTextures(unsigned short size, unsigned short count,
    00378             PixelFormat fmt);
    00380         virtual void prepareShadowTextures(Camera* cam, Viewport* vp);
    00381
    00387         virtual void renderShadowVolumesToStencil(const Light* light, const Camera* cam);
    00393         virtual void setShadowVolumeStencilState(bool secondpass, bool zfail, bool twosided);
    00395         void renderShadowVolumeObjects(ShadowCaster::ShadowRenderableListIterator iShadowRenderables,
    00396             Pass* pass, const LightList *manualLightList, unsigned long flags,
    00397             bool secondpass, bool zfail, bool twosided);
    00398         typedef std::vector<ShadowCaster*> ShadowCasterList;
    00399         ShadowCasterList mShadowCasterList;
    00400         SphereSceneQuery* mShadowCasterSphereQuery;
    00401         AxisAlignedBoxSceneQuery* mShadowCasterAABBQuery;
    00402         Real mShadowFarDist;
    00403         Real mShadowFarDistSquared;
    00404         Real mShadowTextureOffset; // proportion of texture offset in view direction e.g. 0.4
    00405         Real mShadowTextureFadeStart; // as a proportion e.g. 0.6
    00406         Real mShadowTextureFadeEnd; // as a proportion e.g. 0.9
    00407         bool mShadowTextureSelfShadow;
    00408         Pass* mShadowTextureCustomCasterPass;
    00409         Pass* mShadowTextureCustomReceiverPass;
    00410         String mShadowTextureCustomCasterVertexProgram;
    00411         String mShadowTextureCustomReceiverVertexProgram;
    00412         GpuProgramParametersSharedPtr mShadowTextureCustomCasterVPParams;
    00413         GpuProgramParametersSharedPtr mShadowTextureCustomReceiverVPParams;
    00414         bool mShadowTextureCasterVPDirty;
    00415         bool mShadowTextureReceiverVPDirty;
    00416
    00417
    00418         GpuProgramParametersSharedPtr mInfiniteExtrusionParams;
    00419         GpuProgramParametersSharedPtr mFiniteExtrusionParams;
    00420
    00422         class _OgreExport ShadowCasterSceneQueryListener : public SceneQueryListener
    00423         {
    00424         protected:
    00425             SceneManager* mSceneMgr;
    00426             ShadowCasterList* mCasterList;
    00427             bool mIsLightInFrustum;
    00428             const PlaneBoundedVolumeList* mLightClipVolumeList;
    00429             const Camera* mCamera;
    00430             const Light* mLight;
    00431             Real mFarDistSquared;
    00432         public:
    00433             ShadowCasterSceneQueryListener(SceneManager* sm) : mSceneMgr(sm),
    00434                 mCasterList(0), mIsLightInFrustum(false), mLightClipVolumeList(0),
    00435                 mCamera(0) {}
    00436             // Prepare the listener for use with a set of parameters
    00437             void prepare(bool lightInFrustum,
    00438                 const PlaneBoundedVolumeList* lightClipVolumes,
    00439                 const Light* light, const Camera* cam, ShadowCasterList* casterList,
    00440                 Real farDistSquared)
    00441             {
    00442                 mCasterList = casterList;
    00443                 mIsLightInFrustum = lightInFrustum;
    00444                 mLightClipVolumeList = lightClipVolumes;
    00445                 mCamera = cam;
    00446                 mLight = light;
    00447                 mFarDistSquared = farDistSquared;
    00448             }
    00449             bool queryResult(MovableObject* object);
    00450             bool queryResult(SceneQuery::WorldFragment* fragment);
    00451         };
    00452
    00453         ShadowCasterSceneQueryListener* mShadowCasterQueryListener;
    00454
    00461         virtual const ShadowCasterList& findShadowCastersForLight(const Light* light,
    00462             const Camera* camera);
    00465         virtual void renderQueueGroupObjects(RenderQueueGroup* group);
    00467         virtual void renderBasicQueueGroupObjects(RenderQueueGroup* pGroup);
    00469         virtual void renderAdditiveStencilShadowedQueueGroupObjects(RenderQueueGroup* group);
    00471         virtual void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* group);
    00473         virtual void renderTextureShadowCasterQueueGroupObjects(RenderQueueGroup* group);
    00475         virtual void renderTextureShadowReceiverQueueGroupObjects(RenderQueueGroup* group);
    00477         virtual void renderModulativeTextureShadowedQueueGroupObjects(RenderQueueGroup* group);
    00479         virtual void renderObjects(const RenderPriorityGroup::SolidRenderablePassMap& objs,
    00480             bool doLightIteration, const LightList* manualLightList = 0);
    00482         virtual void renderObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,
    00483             bool doLightIteration, const LightList* manualLightList = 0);
    00489         virtual void renderTransparentShadowCasterObjects(const RenderPriorityGroup::TransparentRenderablePassList& objs,
    00490             bool doLightIteration, const LightList* manualLightList = 0);
    00491
    00492     public:
    00495         SceneManager();
    00496
    00499         virtual ~SceneManager();
    00500
    00508         virtual Camera* createCamera(const String& name);
    00509
    00512         virtual Camera* getCamera(const String& name);
    00513
    00522         virtual void removeCamera(Camera *cam);
    00523
    00529         virtual void removeCamera(const String& name);
    00530
    00533         virtual void removeAllCameras(void);
    00534
    00545         virtual Light* createLight(const String& name);
    00546
    00549         virtual Light* getLight(const String& name);
    00550
    00555         virtual void removeLight(const String& name);
    00556
    00561         virtual void removeLight(Light* light);
    00564         virtual void removeAllLights(void);
    00565
    00585         virtual void _populateLightList(const Vector3& position, Real radius, LightList& destList);
    00586
    00587
    00604         virtual SceneNode* createSceneNode(void);
    00605
    00620         virtual SceneNode* createSceneNode(const String& name);
    00621
    00628         virtual void destroySceneNode(const String& name);
    00629
    00645         virtual SceneNode* getRootSceneNode(void) const;
    00646
    00653         virtual SceneNode* getSceneNode(const String& name) const;
    00654
    00662         virtual Entity* createEntity(const String& entityName, const String& meshName);
    00663
    00670         enum PrefabType {
    00671             PT_PLANE
    00672         };
    00673
    00680         virtual Entity* createEntity(const String& entityName, PrefabType ptype);
    00682         virtual Entity* getEntity(const String& name);
    00683
    00692         virtual void removeEntity(Entity* ent);
    00693
    00702         virtual void removeEntity(const String& name);
    00703
    00713         virtual void removeAllEntities(void);
    00714
    00720         virtual void clearScene(void);
    00721
    00734         void setAmbientLight(const ColourValue& colour);
    00735
    00738         const ColourValue& getAmbientLight(void) const;
    00739
    00755         virtual void setWorldGeometry(const String& filename);
    00756
    00769         virtual size_t estimateWorldGeometry(const String& filename) { return 0; }
    00770
    00785         virtual ViewPoint getSuggestedViewpoint(bool random = false);
    00786
    00800         virtual bool setOption( const String& strKey, const void* pValue ) { return false; }
    00801
    00815         virtual bool getOption( const String& strKey, void* pDestValue ) { return false; }
    00816
    00826         virtual bool hasOption( const String& strKey ) const { return false; }
    00841         virtual bool getOptionValues( const String& strKey, StringVector& refValueList ) { return false; }
    00842
    00849         virtual bool getOptionKeys( StringVector& refKeys ) { return false; }
    00850
    00859         virtual void _updateSceneGraph(Camera* cam);
    00860
    00872         virtual void _findVisibleObjects(Camera* cam, bool onlyShadowCasters);
    00873
    00878         virtual void _applySceneAnimations(void);
    00879
    00882         virtual void _renderVisibleObjects(void);
    00883
    00897         virtual void _renderScene(Camera* camera, Viewport* vp, bool includeOverlays);
    00898
    00902         virtual void _queueSkiesForRendering(Camera* cam);
    00903
    00904
    00905
    00914         virtual void _setDestinationRenderSystem(RenderSystem* sys);
    00915
    00968         virtual void setSkyPlane(
    00969             bool enable,
    00970             const Plane& plane, const String& materialName, Real scale = 1000,
    00971             Real tiling = 10, bool drawFirst = true, Real bow = 0,
    00972             int xsegments = 1, int ysegments = 1,
    00973             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    00974
    01016         virtual void setSkyBox(
    01017             bool enable, const String& materialName, Real distance = 5000,
    01018             bool drawFirst = true, const Quaternion& orientation = Quaternion::IDENTITY,
    01019             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    01020
    01076         virtual void setSkyDome(
    01077             bool enable, const String& materialName, Real curvature = 10,
    01078             Real tiling = 8, Real distance = 4000, bool drawFirst = true,
    01079             const Quaternion& orientation = Quaternion::IDENTITY,
    01080             int xsegments = 16, int ysegments = 16, int ysegments_keep = -1,
    01081             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    01082
    01107         void setFog(
    01108             FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White,
    01109             Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0);
    01110
    01113         virtual FogMode getFogMode(void) const;
    01114
    01117         virtual const ColourValue& getFogColour(void) const;
    01118
    01121         virtual Real getFogStart(void) const;
    01122
    01125         virtual Real getFogEnd(void) const;
    01126
    01129         virtual Real getFogDensity(void) const;
    01130
    01131
    01149         virtual BillboardSet* createBillboardSet(const String& name, unsigned int poolSize = 20);
    01150
    01153         virtual BillboardSet* getBillboardSet(const String& name);
    01154
    01161         virtual void removeBillboardSet(BillboardSet* set);
    01162
    01169         virtual void removeBillboardSet(const String& name);
    01170
    01180         virtual void removeAllBillboardSets(void);
    01181
    01189         virtual void setDisplaySceneNodes(bool display);
    01190
    01211         virtual Animation* createAnimation(const String& name, Real length);
    01212
    01214         virtual Animation* getAnimation(const String& name) const;
    01215
    01221         virtual void destroyAnimation(const String& name);
    01222
    01224         virtual void destroyAllAnimations(void);
    01225
    01249         virtual AnimationState* createAnimationState(const String& animName);
    01250
    01252         virtual AnimationState* getAnimationState(const String& animName);
    01253
    01259         virtual void destroyAnimationState(const String& name);
    01260
    01262         virtual void destroyAllAnimationStates(void);
    01263
    01287         virtual void manualRender(RenderOperation* rend, Pass* pass, Viewport* vp,
    01288             const Matrix4& worldMatrix, const Matrix4& viewMatrix, const Matrix4& projMatrix,
    01289             bool doBeginEndFrame = false) ;
    01290
    01301         virtual RenderQueue* getRenderQueue(void);
    01302
    01306         virtual void addRenderQueueListener(RenderQueueListener* newListener);
    01307
    01309         virtual void removeRenderQueueListener(RenderQueueListener* delListener);
    01310
    01324         virtual void addSpecialCaseRenderQueue(RenderQueueGroupID qid);
    01330         virtual void removeSpecialCaseRenderQueue(RenderQueueGroupID qid);
    01334         virtual void clearSpecialCaseRenderQueues(void);
    01339         virtual void setSpecialCaseRenderQueueMode(SpecialCaseRenderQueueMode mode);
    01341         virtual SpecialCaseRenderQueueMode getSpecialCaseRenderQueueMode(void);
    01348         virtual bool isRenderQueueToBeProcessed(RenderQueueGroupID qid);
    01349
    01365         virtual void setWorldGeometryRenderQueue(RenderQueueGroupID qid);
    01376         virtual RenderQueueGroupID getWorldGeometryRenderQueue(void);
    01377
    01379         virtual void showBoundingBoxes(bool bShow);
    01380
    01382         virtual bool getShowBoundingBoxes() const;
    01383
    01385         virtual void _notifyAutotrackingSceneNode(SceneNode* node, bool autoTrack);
    01386
    01387
    01400         virtual AxisAlignedBoxSceneQuery*
    01401             createAABBQuery(const AxisAlignedBox& box, unsigned long mask = 0xFFFFFFFF);
    01414         virtual SphereSceneQuery*
    01415             createSphereQuery(const Sphere& sphere, unsigned long mask = 0xFFFFFFFF);
    01428         virtual PlaneBoundedVolumeListSceneQuery*
    01429             createPlaneBoundedVolumeQuery(const PlaneBoundedVolumeList& volumes, unsigned long mask = 0xFFFFFFFF);
    01430
    01431
    01444         virtual RaySceneQuery*
    01445             createRayQuery(const Ray& ray, unsigned long mask = 0xFFFFFFFF);
    01446         //PyramidSceneQuery* createPyramidQuery(const Pyramid& p, unsigned long mask = 0xFFFFFFFF);
    01458         virtual IntersectionSceneQuery*
    01459             createIntersectionQuery(unsigned long mask = 0xFFFFFFFF);
    01460
    01462         virtual void destroyQuery(SceneQuery* query);
    01463
    01464         typedef MapIterator<SceneLightList> LightIterator;
    01465         typedef MapIterator<EntityList> EntityIterator;
    01466         typedef MapIterator<CameraList> CameraIterator;
    01467         typedef MapIterator<BillboardSetList> BillboardSetIterator;
    01468         typedef MapIterator<AnimationList> AnimationIterator;
    01469
    01471         LightIterator getLightIterator(void) {
    01472             return LightIterator(mLights.begin(), mLights.end());
    01473         }
    01475         EntityIterator getEntityIterator(void) {
    01476             return EntityIterator(mEntities.begin(), mEntities.end());
    01477         }
    01479         CameraIterator getCameraIterator(void) {
    01480             return CameraIterator(mCameras.begin(), mCameras.end());
    01481         }
    01483         BillboardSetIterator getBillboardSetIterator(void) {
    01484             return BillboardSetIterator(mBillboardSets.begin(), mBillboardSets.end());
    01485         }
    01487         AnimationIterator getAnimationIterator(void) {
    01488             return AnimationIterator(mAnimationsList.begin(), mAnimationsList.end());
    01489         }
    01491         AnimationStateIterator getAnimationStateIterator(void) {
    01492             return AnimationStateIterator(mAnimationStates.begin(), mAnimationStates.end());
    01493         }
    01494
    01527         virtual void setShadowTechnique(ShadowTechnique technique);
    01528
    01530         virtual ShadowTechnique getShadowTechnique(void) const { return mShadowTechnique; }
    01531
    01533         virtual void setShowDebugShadows(bool debug) { mDebugShadows = debug; }
    01535         virtual bool getShowDebugShadows(void ) const { return mDebugShadows; }
    01536
    01543         virtual void setShadowColour(const ColourValue& colour);
    01550         virtual const ColourValue& getShadowColour(void) const;
    01562         virtual void setShadowDirectionalLightExtrusionDistance(Real dist);
    01565         virtual Real getShadowDirectionalLightExtrusionDistance(void) const;
    01581         virtual void setShadowFarDistance(Real distance);
    01585         virtual Real getShadowFarDistance(void) const
    01586         { return mShadowFarDist; }
    01587
    01613         virtual void setShadowIndexBufferSize(size_t size);
    01615         virtual size_t getShadowIndexBufferSize(void) const
    01616         { return mShadowIndexBufferSize; }
    01623         virtual void setShadowTextureSize(unsigned short size);
    01625         unsigned short getShadowTextureSize(void) const {return mShadowTextureSize; }
    01635         virtual void setShadowTexturePixelFormat(PixelFormat fmt);
    01637         PixelFormat getShadowTexturePixelFormat(void) const {return mShadowTextureFormat; }
    01645         virtual void setShadowTextureCount(unsigned short count);
    01647         unsigned short getShadowTextureCount(void) const {return mShadowTextureCount; }
    01654         virtual void setShadowTextureSettings(unsigned short size, unsigned short count,
    01655             PixelFormat fmt = PF_X8R8G8B8);
    01670         virtual void setShadowDirLightTextureOffset(Real offset) { mShadowTextureOffset = offset;}
    01678         virtual void setShadowTextureFadeStart(Real fadeStart)
    01679         { mShadowTextureFadeStart = fadeStart; }
    01687         virtual void setShadowTextureFadeEnd(Real fadeEnd)
    01688         { mShadowTextureFadeEnd = fadeEnd; }
    01689
    01702         virtual void setShadowTextureSelfShadow(bool selfShadow)
    01703         { mShadowTextureSelfShadow = selfShadow; }
    01705         virtual bool getShadowTextureSelfShadow(void) const
    01706         { return mShadowTextureSelfShadow; }
    01727         virtual void setShadowTextureCasterMaterial(const String& name);
    01749         virtual void setShadowTextureReceiverMaterial(const String& name);
    01750
    01787         virtual void setShadowUseInfiniteFarPlane(bool enable) {
    01788             mShadowUseInfiniteFarPlane = enable; }
    01789
    01799         virtual StaticGeometry* createStaticGeometry(const String& name);
    01801         virtual StaticGeometry* getStaticGeometry(const String& name) const;
    01803         virtual void removeStaticGeometry(StaticGeometry* geom);
    01805         virtual void removeStaticGeometry(const String& name);
    01807         virtual void removeAllStaticGeometry(void);
    01808
    01809
    01810     };
    01811
    01813     class _OgreExport DefaultIntersectionSceneQuery :
    01814         public IntersectionSceneQuery
    01815     {
    01816     public:
    01817         DefaultIntersectionSceneQuery(SceneManager* creator);
    01818         ~DefaultIntersectionSceneQuery();
    01819
    01821         void execute(IntersectionSceneQueryListener* listener);
    01822     };
    01823
    01825     class _OgreExport DefaultRaySceneQuery : public RaySceneQuery
    01826     {
    01827     public:
    01828         DefaultRaySceneQuery(SceneManager* creator);
    01829         ~DefaultRaySceneQuery();
    01830
    01832         void execute(RaySceneQueryListener* listener);
    01833     };
    01835     class _OgreExport DefaultSphereSceneQuery : public SphereSceneQuery
    01836     {
    01837     public:
    01838         DefaultSphereSceneQuery(SceneManager* creator);
    01839         ~DefaultSphereSceneQuery();
    01840
    01842         void execute(SceneQueryListener* listener);
    01843     };
    01845     class _OgreExport DefaultPlaneBoundedVolumeListSceneQuery : public PlaneBoundedVolumeListSceneQuery
    01846     {
    01847     public:
    01848         DefaultPlaneBoundedVolumeListSceneQuery(SceneManager* creator);
    01849         ~DefaultPlaneBoundedVolumeListSceneQuery();
    01850
    01852         void execute(SceneQueryListener* listener);
    01853     };
    01855     class _OgreExport DefaultAxisAlignedBoxSceneQuery : public AxisAlignedBoxSceneQuery
    01856     {
    01857     public:
    01858         DefaultAxisAlignedBoxSceneQuery(SceneManager* creator);
    01859         ~DefaultAxisAlignedBoxSceneQuery();
    01860
    01862         void execute(SceneQueryListener* listener);
    01863     };
    01864
    01865
    01866
    01867 } // Namespace
    01868
    01869
    01870
    01871 #endif

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:36:06 2005