#ifndef _ViewCell_H__ #define _ViewCell_H__ #include "Mesh.h" #include "Containers.h" #include "Ray.h" //namespace GtpVisibilityPreprocessor { class BspInterior; class BspPvs; struct Triangle3; /** View cell with an optional mesh representation */ class ViewCell: public MeshInstance { public: ViewCell(); /** Constructor taking a mesh representing the shape of the viewcell. */ ViewCell(Mesh *mesh); /** Returns PvS. */ ViewCellPvs &GetPvs(); int Type() const; /** Derives viewcells from object container. @param objects the intersectables the viewcells are derived from @param viewCells the viewcells are returned in this container @param maxViewCells the maximum number of viewcells created. if 0 => unbounded */ static void DeriveViewCells(const ObjectContainer &objects, ViewCellContainer &viewCells, const int maxViewCells); /** Constructs view cell from base triangle. The ViewCell is extruded along the normal vector. @param the base triangle @param the height of the newly created view cell */ static ViewCell *ExtrudeViewCell(const Triangle3 &baseTri, const float height); void AddPassingRay(const Ray &ray, const int contributions); static bool ParseEnvironment(); protected: /// the potentially visible objects ViewCellPvs mPvs; /** Ray set description of the rays passing through this node */ PassingRaySet mPassingRays; }; //}; // GtpVisibilityPreprocessor #endif