Rev | Line | |
---|
[65] | 1 | #ifndef _VisibilityInfo_H__ |
---|
| 2 | #define _VisibilityInfo_H__ |
---|
| 3 | |
---|
| 4 | #include <vector> |
---|
| 5 | |
---|
| 6 | #include "VisibilityMesh.h" |
---|
| 7 | #include "HierarchyInterface.h" |
---|
| 8 | |
---|
| 9 | namespace GtpVisibility { |
---|
| 10 | |
---|
[71] | 11 | /** Class storing the visibility information of a scene node. |
---|
| 12 | */ |
---|
| 13 | class NodeInfo |
---|
| 14 | { |
---|
| 15 | public: |
---|
| 16 | NodeInfo(HierarchyNode *node,const float v): mNode(node), mVisibility(v) {} |
---|
[65] | 17 | |
---|
[135] | 18 | float GetVisibility() const {return mVisibility;} |
---|
[130] | 19 | |
---|
[71] | 20 | protected: |
---|
[65] | 21 | /** pointer to the scene node */ |
---|
| 22 | HierarchyNode *mNode; |
---|
| 23 | /** node visibility can either be a number of visible pixels or relative |
---|
| 24 | number of visible pixels (if the hardware queries will provide the |
---|
| 25 | total number of ratsterized pixels */ |
---|
| 26 | float mVisibility; |
---|
[71] | 27 | }; |
---|
[65] | 28 | |
---|
[71] | 29 | /** Class storing the visibility information of a mesh. |
---|
| 30 | */ |
---|
| 31 | class MeshInfo |
---|
| 32 | { |
---|
| 33 | public: |
---|
| 34 | MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {} |
---|
[65] | 35 | |
---|
[135] | 36 | float GetVisibility() const {return mVisibility;} |
---|
[130] | 37 | |
---|
[71] | 38 | protected: |
---|
| 39 | /** Pointer to the mesh. |
---|
| 40 | */ |
---|
[65] | 41 | Mesh *mMesh; |
---|
[71] | 42 | /** Node visibility can either be a number of visible pixels or relative |
---|
[65] | 43 | number of visible pixels (if the hardware queries will provide the |
---|
[71] | 44 | total number of ratsterized pixels. |
---|
| 45 | */ |
---|
[65] | 46 | float mVisibility; |
---|
[71] | 47 | }; |
---|
[65] | 48 | |
---|
[71] | 49 | //TODO: this define shall be replaced by template typedef |
---|
[65] | 50 | #define InfoContainer std::vector |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.