[790] | 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 "DistanceCubeMapRenderTechnique.h"
|
---|
[1711] | 11 | #include "OgreCubeMapRenderTechnique.h"
|
---|
[790] | 12 | #include "Ogre.h"
|
---|
| 13 |
|
---|
| 14 | using namespace Ogre;
|
---|
| 15 |
|
---|
| 16 | /**
|
---|
| 17 | @brief DistanceCubeMapRenderTechnique used in an Ogre environment.
|
---|
| 18 | */
|
---|
| 19 | class OgreDistanceCubeMapRenderTechnique : public DistanceCubeMapRenderTechnique,
|
---|
[1711] | 20 | public OgreCubeMapRenderTechnique
|
---|
[790] | 21 | {
|
---|
| 22 | public:
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | @brief Constructor.
|
---|
| 26 |
|
---|
| 27 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
| 28 | @param cubeMapUpdateInterval update frequency
|
---|
| 29 | @param cubeMapResolution distance cubemap resolution
|
---|
| 30 | @param texID the id of the texture unit state the resulting cubemap should be bound to
|
---|
| 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 | @param pass the pass to operate on
|
---|
| 37 | @param parentRenderable the object to operate on
|
---|
| 38 | @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to
|
---|
| 39 | */
|
---|
| 40 | OgreDistanceCubeMapRenderTechnique( unsigned long startFrame,
|
---|
| 41 | unsigned long cubeMapUpdateInterval,
|
---|
| 42 | unsigned int cubeMapResolution,
|
---|
| 43 | unsigned char texID,
|
---|
| 44 | bool useDistCalc,
|
---|
| 45 | bool useFaceAngleCalc,
|
---|
| 46 | float distTolerance,
|
---|
| 47 | float angleTolerance,
|
---|
| 48 | bool updateAllFace,
|
---|
[1711] | 49 | bool renderSelf,
|
---|
[1722] | 50 | bool renderEnvironment,
|
---|
| 51 | String selfMaterial,
|
---|
| 52 | String environmentMaterial,
|
---|
[1725] | 53 | int layer,
|
---|
[790] | 54 | Pass* pass,
|
---|
| 55 | OgreRenderable* parentRenderable,
|
---|
| 56 | OgreTechniqueGroup* parentTechniqueGroup
|
---|
| 57 | );
|
---|
| 58 | /**
|
---|
| 59 | @brief Destructor.
|
---|
| 60 | */
|
---|
| 61 | ~OgreDistanceCubeMapRenderTechnique();
|
---|
| 62 |
|
---|
| 63 | //inherited
|
---|
| 64 | void update(unsigned long frameNum);
|
---|
| 65 |
|
---|
| 66 | protected:
|
---|
[1711] | 67 |
|
---|
[790] | 68 | //inherited
|
---|
| 69 | void distanceCubeMapRunChanged(RenderingRun* run);
|
---|
| 70 | //inherited
|
---|
| 71 | void distanceCubeMapRunUpdated(RenderingRun* run);
|
---|
| 72 |
|
---|
| 73 |
|
---|
[836] | 74 | };
|
---|
| 75 |
|
---|
| 76 |
|
---|
[1711] | 77 | class OgreDistanceCubeMapRenderTechniqueFactory : public OgreCubeMapRenderTechniqueFactory
|
---|
[836] | 78 | {
|
---|
| 79 | public:
|
---|
| 80 | OgreDistanceCubeMapRenderTechniqueFactory();
|
---|
| 81 |
|
---|
| 82 | OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
|
---|
| 83 | Pass* pass,
|
---|
| 84 | OgreRenderable* parentRenderable,
|
---|
[1711] | 85 | OgreTechniqueGroup* parentTechniqueGroup);
|
---|
[836] | 86 |
|
---|
[790] | 87 | }; |
---|