1 | #include "DistanceCubeMapRenderTechnique.h"
|
---|
2 |
|
---|
3 |
|
---|
4 | DistanceCubeMapRenderTechnique::DistanceCubeMapRenderTechnique(unsigned long startFrame,
|
---|
5 | unsigned long cubeMapUpdateInterval,
|
---|
6 | unsigned int cubeMapResolution,
|
---|
7 | bool useDistCalc,
|
---|
8 | bool useFaceAngleCalc,
|
---|
9 | float distTolerance,
|
---|
10 | float angleTolerance,
|
---|
11 | bool updateAllFace,
|
---|
12 | bool renderSelf,
|
---|
13 | bool renderEnvironment,
|
---|
14 | int layer,
|
---|
15 | ElementaryRenderable* parentRenderable,
|
---|
16 | TechniqueGroup* parentTechniqueGroup)
|
---|
17 |
|
---|
18 | :CubeMapRenderTechnique( startFrame, cubeMapUpdateInterval, cubeMapResolution,
|
---|
19 | useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance,
|
---|
20 | updateAllFace, renderSelf, renderEnvironment, layer,
|
---|
21 | parentRenderable, parentTechniqueGroup),
|
---|
22 | RenderTechnique(parentRenderable, parentTechniqueGroup)
|
---|
23 | {
|
---|
24 | switch(layer)
|
---|
25 | {
|
---|
26 | case 0:
|
---|
27 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP;
|
---|
28 | break;
|
---|
29 | case 1:
|
---|
30 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP_L1;
|
---|
31 | break;
|
---|
32 | case 2:
|
---|
33 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP_L2;
|
---|
34 | break;
|
---|
35 | case 3:
|
---|
36 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP_L3;
|
---|
37 | break;
|
---|
38 | case 4:
|
---|
39 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP_L4;
|
---|
40 | break;
|
---|
41 | case 5:
|
---|
42 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP_L5;
|
---|
43 | break;
|
---|
44 | case 6:
|
---|
45 | cubemapLayer = ILLUMRUN_DISTANCE_CUBEMAP_L6;
|
---|
46 | break;
|
---|
47 | }
|
---|
48 | }
|
---|
49 |
|
---|
50 | DistanceCubeMapRenderTechnique::~DistanceCubeMapRenderTechnique()
|
---|
51 | {
|
---|
52 |
|
---|
53 | }
|
---|
54 |
|
---|
55 | void DistanceCubeMapRenderTechnique::runChanged(RenderingRunType runType, RenderingRun* run)
|
---|
56 | {
|
---|
57 | if(runType == cubemapLayer)
|
---|
58 | distanceCubeMapRunChanged(run);
|
---|
59 | }
|
---|
60 |
|
---|
61 | void DistanceCubeMapRenderTechnique::runUpdated(RenderingRunType runType, RenderingRun* run)
|
---|
62 | {
|
---|
63 | if(runType == cubemapLayer)
|
---|
64 | distanceCubeMapRunUpdated(run);
|
---|
65 | }
|
---|
66 |
|
---|
67 | void DistanceCubeMapRenderTechnique::update(unsigned long frameNum)
|
---|
68 | {
|
---|
69 | sharedRuns->updateRun(cubemapLayer, frameNum);
|
---|
70 | }
|
---|