[3255] | 1 | #pragma once
|
---|
| 2 | #include "RenderingRun.h"
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | @brief Base abstract class __declspec( dllexport ) that defines a rendering process that creates phase texture.
|
---|
| 6 |
|
---|
| 7 | The phase texture can be used as a look-up table during rendering of partcipating media.
|
---|
| 8 | If the texture is created once it can be saved and reused, so this run is usually not needed, only runned once.
|
---|
| 9 | This texture is addressed as the following: the u coordinates represents the symmetry of scattering
|
---|
| 10 | (negative if backward scattering, positive if forward scattering and zero if equally scaterring in the forward and in the backward directions)
|
---|
| 11 | ; the v coordinates represent the cosine of the angle between the incoming and outgoing directions.
|
---|
| 12 | */
|
---|
| 13 | class __declspec( dllexport ) PhaseTextureRenderingRun : virtual public RenderingRun
|
---|
| 14 | {
|
---|
| 15 | public:
|
---|
| 16 | /**
|
---|
| 17 | @brief Constructor.
|
---|
| 18 |
|
---|
| 19 | @param resolutionX width of the texture
|
---|
| 20 | @param resolutionY height of the texture
|
---|
| 21 | */
|
---|
| 22 | PhaseTextureRenderingRun(unsigned int resolutionX,
|
---|
| 23 | unsigned int resolutionY)
|
---|
| 24 | :RenderingRun(1, 1)
|
---|
| 25 | {
|
---|
| 26 | this->resolutionX = resolutionX;
|
---|
| 27 | this->resolutionY = resolutionY;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | virtual ~PhaseTextureRenderingRun(){}
|
---|
| 31 |
|
---|
| 32 | protected:
|
---|
| 33 | /**
|
---|
| 34 | @brief width of the texture
|
---|
| 35 | */
|
---|
| 36 | unsigned int resolutionX;
|
---|
| 37 | /**
|
---|
| 38 | @brief height of the texture
|
---|
| 39 | */
|
---|
| 40 | unsigned int resolutionY;
|
---|
| 41 | /**
|
---|
| 42 | @brief Creates the depth map texture.
|
---|
| 43 | */
|
---|
| 44 | virtual inline void createPhaseTexture() = 0;
|
---|
| 45 | //inherited
|
---|
| 46 | virtual void updateFrame(unsigned long frameNum) = 0;
|
---|
| 47 | };
|
---|