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

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

added visibility queries

RevLine 
[65]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 
[71]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) {}
[65]17
[130]18        float GetVisibiliy() const {return mVisibility;}
19
[71]20protected:
[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*/
31class MeshInfo
32{
33public:
34        MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {}
[65]35
[130]36        float GetVisibiliy() const {return mVisibility;}
37
[71]38protected:
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.