[1722] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | //disable inheritance warning caused by multiple inheritance
|
---|
| 4 | #if _WIN32
|
---|
| 5 | #if _MSC_VER
|
---|
| 6 | #pragma warning(disable: 4250)
|
---|
| 7 | #endif
|
---|
| 8 | #endif
|
---|
| 9 |
|
---|
| 10 | #include "OgreRenderingRun.h"
|
---|
| 11 | #include "CubeMapRenderingRun.h"
|
---|
| 12 | #include "OgreSharedRuns.h"
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | /**
|
---|
| 16 | @brief ColorCubeMapRenderingRun used in an OGRE environment.
|
---|
| 17 | */
|
---|
| 18 | class OgreCubeMapRenderingRun : public OgreRenderingRun,
|
---|
| 19 | public CubeMapRenderingRun
|
---|
| 20 | {
|
---|
| 21 | public:
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | @brief Constructor.
|
---|
| 25 |
|
---|
| 26 | @param sharedRuns a pointer to the OgreSharedRuns this run belongs to
|
---|
| 27 | @param name the name of the cubemap texture to be created
|
---|
| 28 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
| 29 | @param updateInterval update frequency
|
---|
| 30 | @param resolution cubemap resolution
|
---|
| 31 | @param useDistCalc flag to skip cube face update if object is far away
|
---|
| 32 | @param useFaceAngleCalc flag to skip cube face update if face is neglible
|
---|
| 33 | @param distTolerance distance tolerance used in face skip
|
---|
| 34 | @param angleTolerance angle tolerance used in face skip
|
---|
| 35 | @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame
|
---|
| 36 | */
|
---|
| 37 | OgreCubeMapRenderingRun(OgreSharedRuns* sharedRuns,
|
---|
| 38 | String name,
|
---|
| 39 | unsigned long startFrame,
|
---|
| 40 | unsigned long updateInterval,
|
---|
| 41 | unsigned int resolution,
|
---|
| 42 | bool useDistCalc,
|
---|
| 43 | bool useFaceAngleCalc,
|
---|
| 44 | float distTolerance,
|
---|
| 45 | float angleTolerance,
|
---|
| 46 | bool updateAllFace,
|
---|
| 47 | bool renderSelf,
|
---|
| 48 | bool renderEnvironment,
|
---|
| 49 | String selfMaterial,
|
---|
[1725] | 50 | String environmentMaterial,
|
---|
[1886] | 51 | bool getMinMax,
|
---|
[1725] | 52 | RenderingRunType cubemapRunType);
|
---|
[1722] | 53 | /**
|
---|
| 54 | @brief returns the name of the resulting color cubemap texture
|
---|
| 55 | */
|
---|
| 56 | String getCubeMapTextureName(){return name;}
|
---|
[1886] | 57 |
|
---|
| 58 | Vector4 getMax(){return max;}
|
---|
| 59 | Vector4 getMin(){return min;}
|
---|
[1722] | 60 |
|
---|
| 61 | protected:
|
---|
| 62 |
|
---|
| 63 | /**
|
---|
| 64 | @brief a pointer to the OgreSharedRuns this run belongs to
|
---|
| 65 | */
|
---|
| 66 | OgreSharedRuns* sharedRuns;
|
---|
| 67 | /**
|
---|
| 68 | @brief the name of the cubemap texture that was created by this run
|
---|
| 69 | */
|
---|
| 70 | String name;
|
---|
| 71 | /**
|
---|
| 72 | @brief a pointer to the cubemap texture that was created by this run
|
---|
| 73 | */
|
---|
| 74 | Texture* cubemapTexture;
|
---|
| 75 | String selfMaterial;
|
---|
| 76 | bool useSelfMaterial;
|
---|
| 77 | String environmentMaterial;
|
---|
| 78 | bool useEnvMaterial;
|
---|
[1725] | 79 | RenderingRunType cubemapRunType;
|
---|
[1886] | 80 |
|
---|
| 81 | Vector4 min;
|
---|
| 82 | Vector4 max;
|
---|
| 83 |
|
---|
| 84 |
|
---|
| 85 | bool getMinMax;
|
---|
[1722] | 86 |
|
---|
[1886] | 87 | void getCubeMapMinMax();
|
---|
[1722] | 88 | //inherited
|
---|
| 89 | inline void createCubeMap();
|
---|
| 90 | //inherited
|
---|
| 91 | inline void updateCubeFace(int facenum);
|
---|
| 92 | //inherited
|
---|
| 93 | bool faceNeedsUpdate(int facenum);
|
---|
| 94 | };
|
---|