[Core Geometry Objects]

a prism is a 3D object, basically a polygon in some plane with some extent in the plane normal direction. More...

`#include <prism.h>`

Collaboration diagram for prism_base_t< Size >:

## Public Member Functions | |

prism_base_t (void) throw () | |

void | clear (void) throw () |

bool | isValid (void) const throw () |

void | setVertexCount (int N) |

## Public Attributes | |

point3d_t | points [Size::eMaxCount] |

int | nVertices |

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.

template<class Size >

prism_base_t< Size >::prism_base_t | ( | void | ) | throw ()` [inline]` |

template<class Size >

void prism_base_t< Size >::clear | ( | void | ) | throw ()` [inline]` |

template<class Size >

bool prism_base_t< Size >::isValid | ( | void | ) | const throw ()` [inline]` |

template<class Size >

void prism_base_t< Size >::setVertexCount | ( | int | N |
) | ` [inline]` |

template<class Size >

point3d_t prism_base_t< Size >::points[Size::eMaxCount] |

template<class Size >

int prism_base_t< Size >::nVertices |

The documentation for this struct was generated from the following file:

Generated on Wed Sep 8 2010 for AESOP Multiplayer Game Framework by 1.7.1