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 "SceneCameraDepthRenderingRun.h"
|
---|
12 | #include "OgreSharedRuns.h"
|
---|
13 |
|
---|
14 |
|
---|
15 | /**
|
---|
16 | @brief SceneCameraDepthRenderingRun used in an OGRE environment.
|
---|
17 | */
|
---|
18 | class OgreSceneCameraDepthRenderingRun : public OgreRenderingRun,
|
---|
19 | public SceneCameraDepthRenderingRun
|
---|
20 | {
|
---|
21 | public:
|
---|
22 |
|
---|
23 | /**
|
---|
24 | @brief Constructor.
|
---|
25 |
|
---|
26 | @param sharedRuns a pointer to the OgreSharedRuns this run belongs to
|
---|
27 | @param name the name of the depth texture to be created
|
---|
28 | @param playerView pointer to the player's viewport
|
---|
29 | */
|
---|
30 | OgreSceneCameraDepthRenderingRun(OgreSharedRuns* sharedRuns,
|
---|
31 | String name,
|
---|
32 | Viewport* playerView);
|
---|
33 |
|
---|
34 | virtual ~OgreSceneCameraDepthRenderingRun(){}
|
---|
35 |
|
---|
36 | /**
|
---|
37 | @brief returns the name of the camera depth texture
|
---|
38 | */
|
---|
39 | String getDepthTextureName(){return name;}
|
---|
40 |
|
---|
41 | void freeAllResources();
|
---|
42 |
|
---|
43 | protected:
|
---|
44 | /**
|
---|
45 | @brief pointer to the player's viewport
|
---|
46 | */
|
---|
47 | Viewport* playerView;
|
---|
48 | /**
|
---|
49 | @brief pointer to the player's camera
|
---|
50 | */
|
---|
51 | Camera* playerCamera;
|
---|
52 | /**
|
---|
53 | @brief a pointer to the OgreSharedRuns this run belongs to
|
---|
54 | */
|
---|
55 | OgreSharedRuns* sharedRuns;
|
---|
56 | /**
|
---|
57 | @brief the name of the depth texture that was created by this run
|
---|
58 | */
|
---|
59 | String name;
|
---|
60 | /**
|
---|
61 | @brief a pointer to the scene depth texture that was created by this run
|
---|
62 | */
|
---|
63 | Texture* depthTexture;
|
---|
64 |
|
---|
65 | //inherited
|
---|
66 | void updateFrame(unsigned long frameNum);
|
---|
67 | //inherited
|
---|
68 | inline void createDepthMap();
|
---|
69 |
|
---|
70 | };
|
---|