a prism is a 3D object, basically a polygon in some plane with some extent in the plane normal direction.
More...
#include <prism.h>
List of all members.
Detailed Description
template<class Size>
struct prism_base_t< Size >
a prism is a 3D object, basically a polygon in some plane with some extent in the plane normal direction.
See wikipedia for the general definition: http://en.wikipedia.org/wiki/Prism_(geometry) In particular, this is a right prism. This class (prism_base_t) is templated, so that the client can decide the max size of the vertex array. Given a polygonal base of N points, you will need 2N vertices. The array of points has a specific convention: point[2 * i] is the vertex on the "floor" (y = 0) point[(2 * i) + 1] is the vertex on the ceiling (y = height above the point[2 * i] vertex) So for instance, any consecutive sequence of 4 points starting with even index is guaranteed to be a planar rectangle. This is a very helpful property of prisms. WARNING: the xz-plane, y-extent convention is recommended for basic prisms. However, prisms can be transformed by arbitrary 3D transformations (see matrix4_t). So you can't assume that an odd-indexed point is only translated in the y-direction from its even-indexed base, for instance. However, consecutive sequences of 4 points starting with even index will always be a planar rectangle, even when transformed.
Definition at line 68 of file prism.h.
Constructor & Destructor Documentation
Member Function Documentation
template<class Size >
bool prism_base_t< Size >::isValid |
( |
void |
|
) |
const throw () [inline] |
template<class Size >
void prism_base_t< Size >::setVertexCount |
( |
IN int |
N |
) |
[inline] |
Member Data Documentation
The documentation for this struct was generated from the following file: