source: trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h @ 311

Revision 311, 1.4 KB checked in by mattausch, 19 years ago (diff)

removed sampling prep bug

Line 
1#ifndef _ViewCell_H__
2#define _ViewCell_H__
3
4#include "Mesh.h"
5#include "Containers.h"
6#include "Ray.h"
7
8//namespace GtpVisibilityPreprocessor {
9 
10class BspInterior;
11class BspPvs;
12struct Triangle3;
13
14/**
15        View cell with an optional mesh representation
16*/
17class ViewCell: public MeshInstance
18{
19public:
20        ViewCell();
21        /** Constructor taking a mesh representing the shape of the viewcell.
22        */
23        ViewCell(Mesh *mesh);
24        /** Returns PvS.
25        */
26        ViewCellPvs &GetPvs();
27
28        int Type() const;
29
30        /** Derives viewcells from object container.
31                @param objects the intersectables the viewcells are derived from
32                @param viewCells the viewcells are returned in this container
33                @param maxViewCells the maximum number of viewcells created. if 0 => unbounded
34        */
35        static void DeriveViewCells(const ObjectContainer &objects,
36                                                                ViewCellContainer &viewCells,
37                                                                const int maxViewCells);
38
39        /** Constructs view cell from base triangle. The ViewCell is extruded along the normal vector.
40                @param the base triangle
41                @param the height of the newly created view cell
42        */
43        static ViewCell *ExtrudeViewCell(const Triangle3 &baseTri, const float height);
44
45        void AddPassingRay(const Ray &ray, const int contributions);   
46
47        static bool ParseEnvironment();
48
49        /** Ray set description of the rays passing through this node */
50        PassingRaySet mPassingRays;
51
52protected:
53
54        /// the potentially visible objects
55        ViewCellPvs mPvs;
56};
57
58//}; // GtpVisibilityPreprocessor
59
60#endif
Note: See TracBrowser for help on using the repository browser.