[3255] | 1 | #pragma once
|
---|
| 2 | #include "RenderingRun.h"
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | @brief Base abstract class __declspec( dllexport ) that defines a rendering process of a particle system impostor image.
|
---|
| 6 |
|
---|
| 7 | This impostor can be used as a texture for ither particle systems. This rendering method is called hieararchical particle system.
|
---|
| 8 | */
|
---|
| 9 | class __declspec( dllexport ) ChildPsystemRenderingRun : virtual public RenderingRun
|
---|
| 10 | {
|
---|
| 11 | public:
|
---|
| 12 | /**
|
---|
| 13 | @brief Constructor.
|
---|
| 14 |
|
---|
| 15 | @param resolution the resolution of the impostor image
|
---|
| 16 | @param perspectiveRendering sets if the impostor should be rendered with a perspective projection or orthogonal
|
---|
| 17 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
| 18 | @param updateInterval update frequency
|
---|
| 19 | */
|
---|
| 20 | ChildPsystemRenderingRun(
|
---|
| 21 | unsigned int resolution,
|
---|
| 22 | bool perspectiveRendering,
|
---|
| 23 | unsigned long startFrame,
|
---|
| 24 | unsigned long updateInterval)
|
---|
| 25 | :RenderingRun(startFrame, updateInterval)
|
---|
| 26 | {
|
---|
| 27 | this->resolution = resolution;
|
---|
| 28 | this->perspectiveRendering = perspectiveRendering;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | virtual ~ChildPsystemRenderingRun(){}
|
---|
| 32 |
|
---|
| 33 | protected:
|
---|
| 34 | /**
|
---|
| 35 | @brief the resolution of the impostor image
|
---|
| 36 | */
|
---|
| 37 | unsigned int resolution;
|
---|
| 38 | /**
|
---|
| 39 | @brief sets if the impostor should be rendered with a perspective projection or orthogonal
|
---|
| 40 | */
|
---|
| 41 | bool perspectiveRendering;
|
---|
| 42 | //inherited
|
---|
| 43 | virtual void updateFrame(unsigned long frameNum) = 0;
|
---|
| 44 | /**
|
---|
| 45 | @brief Creates an impostor texture that can be used as a rendertarget during impostor rendering.
|
---|
| 46 | */
|
---|
| 47 | virtual inline void createImpostorTexture() = 0;
|
---|
| 48 | };
|
---|