Antiprism 0.23
|
Make a prism. More...
#include <polygons.h>
Public Member Functions | |
prism (int N, int D=1) | |
Constructor. | |
prism (polygon &pgon) | |
Constructor. | |
bool | set_twist_angle (double ang=NAN, char *=0) |
Set the twist angle of the polygon based polyhedron. | |
bool | set_edge2 (double e2, char *=0) |
Set the edge length of the non-polygon edges. | |
void | make_poly_part (geom_if &geom) |
Make a part of (or a complete) polygon-based polyhedron. |
Make a prism.
prism::prism | ( | int | N, |
int | D = 1 |
||
) | [inline] |
Constructor.
Base polygon in form {N/D} (with N/D not necessarily in lowest form.)
N | number of sides to the (compound) polygon. |
D | the number of vertices stepped by an edge (default 1) |
prism::prism | ( | polygon & | pgon | ) | [inline] |
Constructor.
pgon | polygon to base the polyhedron on. |
void prism::make_poly_part | ( | geom_if & | geom | ) | [virtual] |
Make a part of (or a complete) polygon-based polyhedron.
Make a non-compound polyhedron, using num_sides
and step
for {n/d}. If parts
is greater than 1
then polygon::make_poly will make a compound by repeating this polyhedron parts
times.
geom | a geometry to return the polyhedron. |
Reimplemented from polygon.
bool prism::set_edge2 | ( | double | len2, |
char * | msg = 0 |
||
) | [inline, virtual] |
Set the edge length of the non-polygon edges.
These are the vertical edges of a prism, the slanting edges of a pyramid, etc.
len2 | the edge length of the non-polygon edges. |
msg | a string with length at least MSG_SZ to hold the error message if the edge length was not valid. |
true
if the edge length was valid, otherwise false
and msg
contains the error messge. Reimplemented from polygon.
bool prism::set_twist_angle | ( | double | ang = NAN , |
char * | msg = 0 |
||
) | [inline, virtual] |
Set the twist angle of the polygon based polyhedron.
Some polyhedra can be transformed by a twist, controlled by this angle. NAN indicates that no twist should be considered.
ang | the angle of twist (default: NAN for no twist). |
msg | a string with length at least MSG_SZ to hold the error message if the edge length was not valid. |
true
if the polyhedron could be twisted, otherwise false
and msg
contains the error messge. Reimplemented from polygon.