Classes

prism.h File Reference

#include "geometry_3d.h"
#include "matrix_4.h"
Include dependency graph for prism.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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. More...
class  DefaultSize



typedef prism_base_t< DefaultSizeprism_t
 a default prism class, supporting up to 16 points (supports prisms based on polygons up to 8 sides).
void createRegularPrism (int nSides, float radius, float height, point3d_t *points)
 creates a 3D prism whose base is a regular N-polygon, with specified radius and height.
template<class Size >
void createRegularPrism (int nSides, float radius, float height, prism_base_t< Size > &prism)
 helper method to create a regular prism
template<class Size >
prism_base_t< Size > operator* (const matrix4_t &T, const prism_base_t< Size > &prism)
 transforms a prism by a matrix4_t transformation

Typedef Documentation

a default prism class, supporting up to 16 points (supports prisms based on polygons up to 8 sides).

Definition at line 104 of file prism.h.


Function Documentation

void createRegularPrism ( int  nSides,
float  radius,
float  height,
point3d_t points 
)

creates a 3D prism whose base is a regular N-polygon, with specified radius and height.

Caller must provide an array big enough to hold 2*nSides points. That array is populated on output. The polygons are in the xz plane, separated by distance height in the y direction.

Definition at line 55 of file prism.cpp.

template<class Size >
void createRegularPrism ( int  nSides,
float  radius,
float  height,
prism_base_t< Size > &  prism 
)

helper method to create a regular prism

Definition at line 122 of file prism.h.

template<class Size >
prism_base_t<Size> operator* ( const matrix4_t T,
const prism_base_t< Size > &  prism 
)

transforms a prism by a matrix4_t transformation

Definition at line 139 of file prism.h.