# 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 destroyShadowTextures(void);
    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
    00541         virtual void removeAllCameras(void);
    00542
    00553         virtual Light* createLight(const String& name);
    00554
    00557         virtual Light* getLight(const String& name);
    00558
    00563         virtual void removeLight(const String& name);
    00564
    00569         virtual void removeLight(Light* light);
    00572         virtual void removeAllLights(void);
    00573
    00593         virtual void _populateLightList(const Vector3& position, Real radius, LightList& destList);
    00594
    00595
    00612         virtual SceneNode* createSceneNode(void);
    00613
    00628         virtual SceneNode* createSceneNode(const String& name);
    00629
    00636         virtual void destroySceneNode(const String& name);
    00637
    00653         virtual SceneNode* getRootSceneNode(void) const;
    00654
    00661         virtual SceneNode* getSceneNode(const String& name) const;
    00662
    00670         virtual Entity* createEntity(const String& entityName, const String& meshName);
    00671
    00678         enum PrefabType {
    00679             PT_PLANE
    00680         };
    00681
    00688         virtual Entity* createEntity(const String& entityName, PrefabType ptype);
    00690         virtual Entity* getEntity(const String& name);
    00691
    00700         virtual void removeEntity(Entity* ent);
    00701
    00710         virtual void removeEntity(const String& name);
    00711
    00721         virtual void removeAllEntities(void);
    00722
    00728         virtual void clearScene(void);
    00729
    00742         void setAmbientLight(const ColourValue& colour);
    00743
    00746         const ColourValue& getAmbientLight(void) const;
    00747
    00763         virtual void setWorldGeometry(const String& filename);
    00764
    00777         virtual size_t estimateWorldGeometry(const String& filename) { return 0; }
    00778
    00793         virtual ViewPoint getSuggestedViewpoint(bool random = false);
    00794
    00808         virtual bool setOption( const String& strKey, const void* pValue ) { return false; }
    00809
    00823         virtual bool getOption( const String& strKey, void* pDestValue ) { return false; }
    00824
    00834         virtual bool hasOption( const String& strKey ) const { return false; }
    00849         virtual bool getOptionValues( const String& strKey, StringVector& refValueList ) { return false; }
    00850
    00857         virtual bool getOptionKeys( StringVector& refKeys ) { return false; }
    00858
    00867         virtual void _updateSceneGraph(Camera* cam);
    00868
    00880         virtual void _findVisibleObjects(Camera* cam, bool onlyShadowCasters);
    00881
    00886         virtual void _applySceneAnimations(void);
    00887
    00890         virtual void _renderVisibleObjects(void);
    00891
    00905         virtual void _renderScene(Camera* camera, Viewport* vp, bool includeOverlays);
    00906
    00910         virtual void _queueSkiesForRendering(Camera* cam);
    00911
    00912
    00913
    00922         virtual void _setDestinationRenderSystem(RenderSystem* sys);
    00923
    00976         virtual void setSkyPlane(
    00977             bool enable,
    00978             const Plane& plane, const String& materialName, Real scale = 1000,
    00979             Real tiling = 10, bool drawFirst = true, Real bow = 0,
    00980             int xsegments = 1, int ysegments = 1,
    00981             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    00982
    00984         virtual bool isSkyPlaneEnabled(void) const { return mSkyPlaneEnabled; }
    00985
    00987         virtual SceneNode* getSkyPlaneNode(void) { return mSkyPlaneNode; }
    00988
    01030         virtual void setSkyBox(
    01031             bool enable, const String& materialName, Real distance = 5000,
    01032             bool drawFirst = true, const Quaternion& orientation = Quaternion::IDENTITY,
    01033             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    01034
    01036         virtual bool isSkyBoxEnabled(void) const { return mSkyBoxEnabled; }
    01037
    01039         virtual SceneNode* getSkyBoxNode(void) const { return mSkyBoxNode; }
    01040
    01096         virtual void setSkyDome(
    01097             bool enable, const String& materialName, Real curvature = 10,
    01098             Real tiling = 8, Real distance = 4000, bool drawFirst = true,
    01099             const Quaternion& orientation = Quaternion::IDENTITY,
    01100             int xsegments = 16, int ysegments = 16, int ysegments_keep = -1,
    01101             const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
    01102
    01104         virtual bool isSkyDomeEnabled(void) const { return mSkyDomeEnabled; }
    01105
    01107         virtual SceneNode* getSkyDomeNode(void) { return mSkyDomeNode; }
    01108
    01133         void setFog(
    01134             FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White,
    01135             Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0);
    01136
    01139         virtual FogMode getFogMode(void) const;
    01140
    01143         virtual const ColourValue& getFogColour(void) const;
    01144
    01147         virtual Real getFogStart(void) const;
    01148
    01151         virtual Real getFogEnd(void) const;
    01152
    01155         virtual Real getFogDensity(void) const;
    01156
    01157
    01175         virtual BillboardSet* createBillboardSet(const String& name, unsigned int poolSize = 20);
    01176
    01179         virtual BillboardSet* getBillboardSet(const String& name);
    01180
    01187         virtual void removeBillboardSet(BillboardSet* set);
    01188
    01195         virtual void removeBillboardSet(const String& name);
    01196
    01206         virtual void removeAllBillboardSets(void);
    01207
    01215         virtual void setDisplaySceneNodes(bool display);
    01216
    01237         virtual Animation* createAnimation(const String& name, Real length);
    01238
    01240         virtual Animation* getAnimation(const String& name) const;
    01241
    01247         virtual void destroyAnimation(const String& name);
    01248
    01250         virtual void destroyAllAnimations(void);
    01251
    01275         virtual AnimationState* createAnimationState(const String& animName);
    01276
    01278         virtual AnimationState* getAnimationState(const String& animName);
    01279
    01285         virtual void destroyAnimationState(const String& name);
    01286
    01288         virtual void destroyAllAnimationStates(void);
    01289
    01313         virtual void manualRender(RenderOperation* rend, Pass* pass, Viewport* vp,
    01314             const Matrix4& worldMatrix, const Matrix4& viewMatrix, const Matrix4& projMatrix,
    01315             bool doBeginEndFrame = false) ;
    01316
    01327         virtual RenderQueue* getRenderQueue(void);
    01328
    01332         virtual void addRenderQueueListener(RenderQueueListener* newListener);
    01333
    01335         virtual void removeRenderQueueListener(RenderQueueListener* delListener);
    01336
    01350         virtual void addSpecialCaseRenderQueue(RenderQueueGroupID qid);
    01356         virtual void removeSpecialCaseRenderQueue(RenderQueueGroupID qid);
    01360         virtual void clearSpecialCaseRenderQueues(void);
    01365         virtual void setSpecialCaseRenderQueueMode(SpecialCaseRenderQueueMode mode);
    01367         virtual SpecialCaseRenderQueueMode getSpecialCaseRenderQueueMode(void);
    01374         virtual bool isRenderQueueToBeProcessed(RenderQueueGroupID qid);
    01375
    01391         virtual void setWorldGeometryRenderQueue(RenderQueueGroupID qid);
    01402         virtual RenderQueueGroupID getWorldGeometryRenderQueue(void);
    01403
    01405         virtual void showBoundingBoxes(bool bShow);
    01406
    01408         virtual bool getShowBoundingBoxes() const;
    01409
    01411         virtual void _notifyAutotrackingSceneNode(SceneNode* node, bool autoTrack);
    01412
    01413
    01426         virtual AxisAlignedBoxSceneQuery*
    01427             createAABBQuery(const AxisAlignedBox& box, unsigned long mask = 0xFFFFFFFF);
    01440         virtual SphereSceneQuery*
    01441             createSphereQuery(const Sphere& sphere, unsigned long mask = 0xFFFFFFFF);
    01454         virtual PlaneBoundedVolumeListSceneQuery*
    01455             createPlaneBoundedVolumeQuery(const PlaneBoundedVolumeList& volumes, unsigned long mask = 0xFFFFFFFF);
    01456
    01457
    01470         virtual RaySceneQuery*
    01471             createRayQuery(const Ray& ray, unsigned long mask = 0xFFFFFFFF);
    01472         //PyramidSceneQuery* createPyramidQuery(const Pyramid& p, unsigned long mask = 0xFFFFFFFF);
    01484         virtual IntersectionSceneQuery*
    01485             createIntersectionQuery(unsigned long mask = 0xFFFFFFFF);
    01486
    01488         virtual void destroyQuery(SceneQuery* query);
    01489
    01490         typedef MapIterator<SceneLightList> LightIterator;
    01491         typedef MapIterator<EntityList> EntityIterator;
    01492         typedef MapIterator<CameraList> CameraIterator;
    01493         typedef MapIterator<BillboardSetList> BillboardSetIterator;
    01494         typedef MapIterator<AnimationList> AnimationIterator;
    01495
    01497         LightIterator getLightIterator(void) {
    01498             return LightIterator(mLights.begin(), mLights.end());
    01499         }
    01501         EntityIterator getEntityIterator(void) {
    01502             return EntityIterator(mEntities.begin(), mEntities.end());
    01503         }
    01505         CameraIterator getCameraIterator(void) {
    01506             return CameraIterator(mCameras.begin(), mCameras.end());
    01507         }
    01509         BillboardSetIterator getBillboardSetIterator(void) {
    01510             return BillboardSetIterator(mBillboardSets.begin(), mBillboardSets.end());
    01511         }
    01513         AnimationIterator getAnimationIterator(void) {
    01514             return AnimationIterator(mAnimationsList.begin(), mAnimationsList.end());
    01515         }
    01517         AnimationStateIterator getAnimationStateIterator(void) {
    01518             return AnimationStateIterator(mAnimationStates.begin(), mAnimationStates.end());
    01519         }
    01520
    01553         virtual void setShadowTechnique(ShadowTechnique technique);
    01554
    01556         virtual ShadowTechnique getShadowTechnique(void) const { return mShadowTechnique; }
    01557
    01559         virtual void setShowDebugShadows(bool debug) { mDebugShadows = debug; }
    01561         virtual bool getShowDebugShadows(void ) const { return mDebugShadows; }
    01562
    01569         virtual void setShadowColour(const ColourValue& colour);
    01576         virtual const ColourValue& getShadowColour(void) const;
    01588         virtual void setShadowDirectionalLightExtrusionDistance(Real dist);
    01591         virtual Real getShadowDirectionalLightExtrusionDistance(void) const;
    01607         virtual void setShadowFarDistance(Real distance);
    01611         virtual Real getShadowFarDistance(void) const
    01612         { return mShadowFarDist; }
    01613
    01639         virtual void setShadowIndexBufferSize(size_t size);
    01641         virtual size_t getShadowIndexBufferSize(void) const
    01642         { return mShadowIndexBufferSize; }
    01649         virtual void setShadowTextureSize(unsigned short size);
    01651         unsigned short getShadowTextureSize(void) const {return mShadowTextureSize; }
    01661         virtual void setShadowTexturePixelFormat(PixelFormat fmt);
    01663         PixelFormat getShadowTexturePixelFormat(void) const {return mShadowTextureFormat; }
    01671         virtual void setShadowTextureCount(unsigned short count);
    01673         unsigned short getShadowTextureCount(void) const {return mShadowTextureCount; }
    01680         virtual void setShadowTextureSettings(unsigned short size, unsigned short count,
    01681             PixelFormat fmt = PF_X8R8G8B8);
    01696         virtual void setShadowDirLightTextureOffset(Real offset) { mShadowTextureOffset = offset;}
    01704         virtual void setShadowTextureFadeStart(Real fadeStart)
    01705         { mShadowTextureFadeStart = fadeStart; }
    01713         virtual void setShadowTextureFadeEnd(Real fadeEnd)
    01714         { mShadowTextureFadeEnd = fadeEnd; }
    01715
    01728         virtual void setShadowTextureSelfShadow(bool selfShadow)
    01729         { mShadowTextureSelfShadow = selfShadow; }
    01731         virtual bool getShadowTextureSelfShadow(void) const
    01732         { return mShadowTextureSelfShadow; }
    01753         virtual void setShadowTextureCasterMaterial(const String& name);
    01775         virtual void setShadowTextureReceiverMaterial(const String& name);
    01776
    01813         virtual void setShadowUseInfiniteFarPlane(bool enable) {
    01814             mShadowUseInfiniteFarPlane = enable; }
    01815
    01825         virtual StaticGeometry* createStaticGeometry(const String& name);
    01827         virtual StaticGeometry* getStaticGeometry(const String& name) const;
    01829         virtual void removeStaticGeometry(StaticGeometry* geom);
    01831         virtual void removeStaticGeometry(const String& name);
    01833         virtual void removeAllStaticGeometry(void);
    01834
    01835
    01836     };
    01837
    01839     class _OgreExport DefaultIntersectionSceneQuery :
    01840         public IntersectionSceneQuery
    01841     {
    01842     public:
    01843         DefaultIntersectionSceneQuery(SceneManager* creator);
    01844         ~DefaultIntersectionSceneQuery();
    01845
    01847         void execute(IntersectionSceneQueryListener* listener);
    01848     };
    01849
    01851     class _OgreExport DefaultRaySceneQuery : public RaySceneQuery
    01852     {
    01853     public:
    01854         DefaultRaySceneQuery(SceneManager* creator);
    01855         ~DefaultRaySceneQuery();
    01856
    01858         void execute(RaySceneQueryListener* listener);
    01859     };
    01861     class _OgreExport DefaultSphereSceneQuery : public SphereSceneQuery
    01862     {
    01863     public:
    01864         DefaultSphereSceneQuery(SceneManager* creator);
    01865         ~DefaultSphereSceneQuery();
    01866
    01868         void execute(SceneQueryListener* listener);
    01869     };
    01871     class _OgreExport DefaultPlaneBoundedVolumeListSceneQuery : public PlaneBoundedVolumeListSceneQuery
    01872     {
    01873     public:
    01874         DefaultPlaneBoundedVolumeListSceneQuery(SceneManager* creator);
    01875         ~DefaultPlaneBoundedVolumeListSceneQuery();
    01876
    01878         void execute(SceneQueryListener* listener);
    01879     };
    01881     class _OgreExport DefaultAxisAlignedBoxSceneQuery : public AxisAlignedBoxSceneQuery
    01882     {
    01883     public:
    01884         DefaultAxisAlignedBoxSceneQuery(SceneManager* creator);
    01885         ~DefaultAxisAlignedBoxSceneQuery();
    01886
    01888         void execute(SceneQueryListener* listener);
    01889     };
    01890
    01891
    01892
    01893 } // Namespace
    01894
    01895
    01896
    01897 #endif

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:52 2006