1 | #pragma once
|
---|
2 | #include "RenderTechnique.h"
|
---|
3 |
|
---|
4 | /**
|
---|
5 | @brief Base abstract class of rendering a color cube map.
|
---|
6 |
|
---|
7 | This technique defines that the final rendering of an object needs a cubmap of the colors of the surrounding environment.
|
---|
8 | */
|
---|
9 | class CubeMapRenderTechnique : virtual public RenderTechnique
|
---|
10 | {
|
---|
11 | public:
|
---|
12 | /**
|
---|
13 | @brief Constructor.
|
---|
14 |
|
---|
15 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
16 | @param cubeMapUpdateInterval update frequency
|
---|
17 | @param cubeMapResolution color cubemap resolution
|
---|
18 | @param useDistCalc flag to skip cube face update if object is far away
|
---|
19 | @param useFaceAngleCalc flag to skip cube face update if face is neglible
|
---|
20 | @param distTolerance distance tolerance used in face skip
|
---|
21 | @param angleTolerance angle tolerance used in face skip
|
---|
22 | @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame
|
---|
23 | @param parentRenderable the object to operate on
|
---|
24 | @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to
|
---|
25 | */
|
---|
26 | CubeMapRenderTechnique( unsigned long startFrame,
|
---|
27 | unsigned long cubeMapUpdateInterval,
|
---|
28 | unsigned int cubeMapResolution,
|
---|
29 | bool useDistCalc,
|
---|
30 | bool useFaceAngleCalc,
|
---|
31 | float distTolerance,
|
---|
32 | float angleTolerance,
|
---|
33 | bool updateAllFace,
|
---|
34 | bool renderSelf,
|
---|
35 | ElementaryRenderable* parentRenderable,
|
---|
36 | TechniqueGroup* parentTechniqueGroup
|
---|
37 | );
|
---|
38 | ~CubeMapRenderTechnique();
|
---|
39 |
|
---|
40 | protected:
|
---|
41 | /**
|
---|
42 | @brief a flag to skip cube face update if object is far away or too small.
|
---|
43 |
|
---|
44 | @see distTolerance
|
---|
45 | */
|
---|
46 | bool useDistCalc;
|
---|
47 | /**
|
---|
48 | @brief a flag to skip cube face update the face is neglible.
|
---|
49 |
|
---|
50 | @see angleTolerance
|
---|
51 | */
|
---|
52 | bool useFaceAngleCalc;
|
---|
53 | /**
|
---|
54 | @brief A value used in face skip test.
|
---|
55 |
|
---|
56 | The higher this value gets the more precise, but slower the method will be.
|
---|
57 | */
|
---|
58 | float distTolerance;
|
---|
59 | /**
|
---|
60 | @brief A value used in face skip test.
|
---|
61 |
|
---|
62 | The higher this value gets the more precise, but slower the method will be.
|
---|
63 | */
|
---|
64 | float angleTolerance;
|
---|
65 | /**
|
---|
66 | @brief defines if all cubemap faces should be updated in a frame or only one face per frame
|
---|
67 | */
|
---|
68 | bool updateAllFace;
|
---|
69 | /**
|
---|
70 | @brief color-cubemap update frequency
|
---|
71 | */
|
---|
72 | unsigned long cubeMapUpdateInterval;
|
---|
73 | /**
|
---|
74 | @brief color-cubemap resolution
|
---|
75 | */
|
---|
76 | unsigned int cubeMapResolution;
|
---|
77 | /**
|
---|
78 | @brief offset in frame number used during update
|
---|
79 | */
|
---|
80 | unsigned long startFrame;
|
---|
81 | bool renderSelf;
|
---|
82 | }; |
---|