#ifndef _ViewCell_H__ #define _ViewCell_H__ #include "Mesh.h" #include "Containers.h" #include "Ray.h" //namespace GtpVisibilityPreprocessor { class BspInterior; class BspPvs; struct Triangle3; class BspLeaf; /** 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. */ const ViewCellPvs &GetPvs() const; ViewCellPvs &GetPvs(); int Type() const; /** Adds a passing ray to the passing ray container. */ void AddPassingRay(const Ray &ray, const int contributions); /// Ray set description of the rays passing through this node. PassingRaySet mPassingRays; /// Rays piercing this view cell. RayContainer mPiercingRays; protected: /// the potentially visible objects ViewCellPvs mPvs; }; class BspViewCell: public ViewCell { public: BspViewCell(): mBspLeaves(0) {} BspViewCell(Mesh *mesh): ViewCell(mesh), mBspLeaves(0) {} /// Leaves which hold this view cell. vector mBspLeaves; }; #endif