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

RevLine 
[219]1#ifndef _ViewCell_H__
2#define _ViewCell_H__
3
[308]4#include "Mesh.h"
[235]5#include "Containers.h"
[308]6#include "Ray.h"
[224]7
[219]8//namespace GtpVisibilityPreprocessor {
9 
[221]10class BspInterior;
[220]11class BspPvs;
[261]12struct Triangle3;
[308]13
[219]14/**
[308]15        View cell with an optional mesh representation
[219]16*/
[308]17class ViewCell: public MeshInstance
[219]18{
19public:
[265]20        ViewCell();
[308]21        /** Constructor taking a mesh representing the shape of the viewcell.
[220]22        */
[235]23        ViewCell(Mesh *mesh);
[308]24        /** Returns PvS.
[220]25        */
[308]26        ViewCellPvs &GetPvs();
[219]27
[308]28        int Type() const;
[220]29
[235]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
[268]33                @param maxViewCells the maximum number of viewcells created. if 0 => unbounded
[235]34        */
35        static void DeriveViewCells(const ObjectContainer &objects,
36                                                                ViewCellContainer &viewCells,
[239]37                                                                const int maxViewCells);
[260]38
[261]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
[308]45        void AddPassingRay(const Ray &ray, const int contributions);   
46
[310]47        static bool ParseEnvironment();
48
[311]49        /** Ray set description of the rays passing through this node */
50        PassingRaySet mPassingRays;
[310]51
[219]52protected:
53
[308]54        /// the potentially visible objects
55        ViewCellPvs mPvs;
[219]56};
[262]57
[219]58//}; // GtpVisibilityPreprocessor
59
60#endif
Note: See TracBrowser for help on using the repository browser.