source: trunk/VUT/GtpVisibility/include/VisibilityInfo.h @ 130

Revision 130, 1.2 KB checked in by mattausch, 19 years ago (diff)

added visibility queries

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