Rev | Line | |
---|
[780] | 1 | #include "DistanceCubeMapRenderingRun.h"
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | DistanceCubeMapRenderingRun::DistanceCubeMapRenderingRun(unsigned long startFrame,
|
---|
| 6 | unsigned long updateInterval,
|
---|
| 7 | unsigned int resolution,
|
---|
| 8 | bool useDistCalc,
|
---|
| 9 | bool useFaceAngleCalc,
|
---|
| 10 | float distTolerance,
|
---|
| 11 | float angleTolerance,
|
---|
| 12 | bool updateAllFace)
|
---|
| 13 | :RenderingRun(startFrame, updateInterval)
|
---|
| 14 | {
|
---|
| 15 | this->useDistCalc = useDistCalc;
|
---|
| 16 | this->useFaceAngleCalc = useFaceAngleCalc;
|
---|
| 17 | this->distTolerance = distTolerance;
|
---|
| 18 | this->angleTolerance = angleTolerance;
|
---|
| 19 | this->resolution = resolution;
|
---|
| 20 | this->updateAllFace = updateAllFace;
|
---|
| 21 |
|
---|
| 22 | currentFace = 0;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | void DistanceCubeMapRenderingRun::updateFrame(unsigned long frameNum)
|
---|
| 26 | {
|
---|
| 27 | if(updateAllFace)
|
---|
| 28 | {
|
---|
| 29 | for(int i=0;i<6;i++)
|
---|
| 30 | {
|
---|
| 31 | updateCubeFace(i);
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
| 34 | else
|
---|
| 35 | {
|
---|
[874] | 36 | if(lastupdated == 0 && updateInterval == 0)
|
---|
[780] | 37 | {
|
---|
| 38 | for(int i=0;i<6;i++)
|
---|
| 39 | {
|
---|
| 40 | updateCubeFace(i);
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
| 43 | else
|
---|
| 44 | {
|
---|
| 45 | if(faceNeedsUpdate(currentFace))
|
---|
| 46 | updateCubeFace(currentFace);
|
---|
| 47 |
|
---|
| 48 | currentFace = (currentFace + 1) % 6;
|
---|
| 49 | }
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.