1 | #pragma once
|
---|
2 |
|
---|
3 | //disable inheritance warning caused by multiple inheritance
|
---|
4 | #if _WIN32
|
---|
5 | #if _MSC_VER
|
---|
6 | #pragma warning(disable: 4250)
|
---|
7 | #endif
|
---|
8 | #endif
|
---|
9 |
|
---|
10 | #include "OgreRenderingRun.h"
|
---|
11 | #include "OgreSharedRuns.h"
|
---|
12 |
|
---|
13 |
|
---|
14 | /**
|
---|
15 | @brief Entry point map computing run.
|
---|
16 |
|
---|
17 | This map is used in the pathmap technique. It stores entry point positions and normals.
|
---|
18 | This texture will be used to determine the amount of incoming light to an entry point. @see OgrePMWeightComputeRenderingRun
|
---|
19 | */
|
---|
20 | class OgrePMEntryPointMapRenderingRun : public OgreRenderingRun
|
---|
21 | {
|
---|
22 | public:
|
---|
23 |
|
---|
24 | /**
|
---|
25 | @brief Constructor.
|
---|
26 |
|
---|
27 | @param name the name of the entry point texture created ny this run
|
---|
28 | */
|
---|
29 | OgrePMEntryPointMapRenderingRun(String name);
|
---|
30 |
|
---|
31 | virtual ~OgrePMEntryPointMapRenderingRun(){}
|
---|
32 |
|
---|
33 | /**
|
---|
34 | @brief returns the name of the entry point texture
|
---|
35 | */
|
---|
36 | String getEntryPointTextureName(){return name;}
|
---|
37 | /**
|
---|
38 | @brief returns the name of the cluster length texture.
|
---|
39 |
|
---|
40 | This texture stores the size (number of entripoints) of each entry point cluster.
|
---|
41 | */
|
---|
42 | String getClusterLengthTextureName(){return clusterLengthTexture->getName();}
|
---|
43 |
|
---|
44 | void freeAllResources();
|
---|
45 |
|
---|
46 | protected:
|
---|
47 |
|
---|
48 | /**
|
---|
49 | @brief the name of the entry point texture that was created by this run
|
---|
50 | */
|
---|
51 | String name;
|
---|
52 | /**
|
---|
53 | @brief a pointer to the entry point texture that was created by this run
|
---|
54 | */
|
---|
55 | Texture* entryPointTexture;
|
---|
56 | /**
|
---|
57 | @brief a pointer to the cluster length texture that was created by this run
|
---|
58 |
|
---|
59 | This texture stores the size (number of entripoints) of each entry point cluster.
|
---|
60 | */
|
---|
61 | Texture* clusterLengthTexture;
|
---|
62 |
|
---|
63 | //inherited
|
---|
64 | void updateFrame(unsigned long frameNum);
|
---|
65 | /**
|
---|
66 | @brief Creates and fills the entry point and the cluster length texture.
|
---|
67 | */
|
---|
68 | inline void createEntryPointMap();
|
---|
69 | //inherited
|
---|
70 | bool needUpdate(unsigned long frameNum )
|
---|
71 | {
|
---|
72 | return true;
|
---|
73 | }
|
---|
74 |
|
---|
75 | };
|
---|