Rev | Line | |
---|
[3255] | 1 | #include "CubeMapRenderingRun.h"
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | CubeMapRenderingRun::CubeMapRenderingRun(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 | bool renderSelf,
|
---|
| 14 | bool renderEnvironment)
|
---|
| 15 | :RenderingRun(startFrame, updateInterval)
|
---|
| 16 | {
|
---|
| 17 | this->useDistCalc = useDistCalc;
|
---|
| 18 | this->useFaceAngleCalc = useFaceAngleCalc;
|
---|
| 19 | this->distTolerance = distTolerance;
|
---|
| 20 | this->angleTolerance = angleTolerance;
|
---|
| 21 | this->resolution = resolution;
|
---|
| 22 | this->updateAllFace = updateAllFace;
|
---|
| 23 | this->renderSelf = renderSelf;
|
---|
| 24 | this->renderEnvironment = renderEnvironment;
|
---|
| 25 |
|
---|
| 26 | currentFace = 0;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | void CubeMapRenderingRun::updateFrame(unsigned long frameNum)
|
---|
| 30 | {
|
---|
| 31 | if(updateAllFace || updateInterval == 0)
|
---|
| 32 | {
|
---|
| 33 | for(int i=0;i<6;i++)
|
---|
| 34 | {
|
---|
| 35 | updateCubeFace(i);
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
| 38 | else
|
---|
| 39 | {
|
---|
| 40 | if(faceNeedsUpdate(currentFace))
|
---|
| 41 | updateCubeFace(currentFace);
|
---|
| 42 |
|
---|
| 43 | currentFace = (currentFace + 1) % 6;
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.