24 #ifndef _POLYHEDRON_HPP_ 25 #define _POLYHEDRON_HPP_ 27 #include "Frustum.hpp" 29 #include "SPolygon.hpp" 45 void add(
const QVector<Vec3f> &verts,
const Vec3f &normal);
58 const QVector<Vec3f> &
getVerts()
const;
69 QVector<Vec3f> uniqueVerts;
71 void addUniqueVert(
const Vec3f &v);
75 bool clip(
float p,
float q,
float &u1,
float &u2)
const;
void makeUniqueVerts()
Makes the unique vertices vector.
QVector< SPolygon > polygons
Vector holding all polygons of this polyhedron.
This implementation is based on Stingl's Robust Hard Shadows.
const QVector< Vec3f > & getVerts() const
Returns the unique vertices.
int getVertCount() const
Returns the unique vertices count.
void add(const Frustum &f)
Adds a frustum to this polyhedron.
An axis-aligned bounding-box class.
Box debugBox
This is used for debugging of the crop matrix It contains the world-space representation of the ortho...
A simple "box" class with 8 arbitrary vertices.
void extrude(const Vec3f &dir, const AABB &bb)
Extrude each point of this polyhedron towards direction until we hit the bounding box...
A templatized 3d vector compatible with openGL.
void intersect(const AABB &bb)
Intersect this polyhedron with the specified bounding box.