Stellarium 0.14.3
|
This implementation is based on Stingl's Robust Hard Shadows. More...
#include <Polyhedron.hpp>
Public Member Functions | |
void | add (const Frustum &f) |
Adds a frustum to this polyhedron. More... | |
void | add (const SPolygon &p) |
Adds a polygon to this polyhedron. More... | |
void | add (const QVector< Vec3f > &verts, const Vec3f &normal) |
Adds a polygon to this polyhedron. More... | |
void | intersect (const AABB &bb) |
Intersect this polyhedron with the specified bounding box. More... | |
void | intersect (const Plane &p) |
Intersect this polyhedron with the specified plane. More... | |
void | extrude (const Vec3f &dir, const AABB &bb) |
Extrude each point of this polyhedron towards direction until we hit the bounding box. More... | |
void | clear () |
Clear up. More... | |
int | getVertCount () const |
Returns the unique vertices count. More... | |
const QVector< Vec3f > & | getVerts () const |
Returns the unique vertices. More... | |
void | makeUniqueVerts () |
Makes the unique vertices vector. More... | |
void | render () const |
Public Attributes | |
QVector< SPolygon > | polygons |
Vector holding all polygons of this polyhedron. More... | |
Box | debugBox |
This is used for debugging of the crop matrix It contains the world-space representation of the orthographic projection used for shadowmapping. More... | |
This implementation is based on Stingl's Robust Hard Shadows.
Definition at line 31 of file Polyhedron.hpp.
void Polyhedron::add | ( | const Frustum & | f | ) |
Adds a frustum to this polyhedron.
void Polyhedron::add | ( | const SPolygon & | p | ) |
Adds a polygon to this polyhedron.
void Polyhedron::add | ( | const QVector< Vec3f > & | verts, |
const Vec3f & | normal | ||
) |
Adds a polygon to this polyhedron.
void Polyhedron::clear | ( | ) |
Clear up.
void Polyhedron::extrude | ( | const Vec3f & | dir, |
const AABB & | bb | ||
) |
Extrude each point of this polyhedron towards direction until we hit the bounding box.
int Polyhedron::getVertCount | ( | ) | const |
Returns the unique vertices count.
const QVector<Vec3f>& Polyhedron::getVerts | ( | ) | const |
Returns the unique vertices.
void Polyhedron::intersect | ( | const AABB & | bb | ) |
Intersect this polyhedron with the specified bounding box.
void Polyhedron::intersect | ( | const Plane & | p | ) |
Intersect this polyhedron with the specified plane.
void Polyhedron::makeUniqueVerts | ( | ) |
Makes the unique vertices vector.
Box Polyhedron::debugBox |
This is used for debugging of the crop matrix It contains the world-space representation of the orthographic projection used for shadowmapping.
Definition at line 66 of file Polyhedron.hpp.
QVector<SPolygon> Polyhedron::polygons |
Vector holding all polygons of this polyhedron.
Definition at line 38 of file Polyhedron.hpp.