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.
A simple line class, identified by a point and a direction vector.
void extrude(const Vec3f &dir, const AABBox &bb)
Extrude each point of this polyhedron towards direction until we hit the bounding box...
This implementation is based on Stingl's Robust Hard Shadows.
void intersect(const AABBox &bb)
Intersect this polyhedron with the specified bounding box.
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.
A templatized 3d vector compatible with openGL.
An axis-aligned bounding-box class.