Antiprism 0.23
Public Member Functions

snub_antiprism Class Reference

Make a snub-antiprism. More...

#include <polygons.h>

Inheritance diagram for snub_antiprism:
Inheritance graph
[legend]
Collaboration diagram for snub_antiprism:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 snub_antiprism (int N, int D=1)
 Constructor.
 snub_antiprism (polygon &pgon)
 Constructor.
bool set_edge2 (double e2, char *msg=0)
 Set the edge length of the non-polygon edges.
bool set_height (double, char *msg=0)
 Set the height.
void make_poly_part (geom_if &geom)
 Make a part of (or a complete) polygon-based polyhedron.

Detailed Description

Make a snub-antiprism.


Constructor & Destructor Documentation

snub_antiprism::snub_antiprism ( int  N,
int  D = 1 
) [inline]

Constructor.

Base polygon in form {N/D} (with N/D not necessarily in lowest form.)

Parameters:
Nnumber of sides to the (compound) polygon.
Dthe number of vertices stepped by an edge (default 1)
snub_antiprism::snub_antiprism ( polygon pgon) [inline]

Constructor.

Parameters:
pgonpolygon to base the polyhedron on.

Member Function Documentation

void snub_antiprism::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.

Parameters:
geoma geometry to return the polyhedron.

Reimplemented from polygon.

bool snub_antiprism::set_edge2 ( double  len2,
char *  msg = 0 
) [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.

Parameters:
len2the edge length of the non-polygon edges.
msga string with length at least MSG_SZ to hold the error message if the edge length was not valid.
Returns:
true if the edge length was valid, otherwise false and msg contains the error messge.

Reimplemented from polygon.

bool snub_antiprism::set_height ( double  ht,
char *  msg = 0 
) [virtual]

Set the height.

Parameters:
htthe height.
msga string with length at least MSG_SZ to hold the error message if the height was not valid.
Returns:
true if the height was valid, otherwise false and msg contains the error messge.

Reimplemented from polygon.


The documentation for this class was generated from the following files: