Public Methods | |
Cylinder () | |
Cylinder (Coord bottom, Coord top, double radius, double topCone=0, double bottomCone=0) | |
void | setLocations (Coord bottom, Coord top) |
void | setRadius (double radius) |
void | setCones (double topCone=0, double bottomCone=0) |
void | setParams (Coord top, Coord bottom, double radius, double topCone=0, double bottomCone=0) |
void | getLocations (Coord &top, Coord &bottom) const |
void | getRadius (double &radius) const |
void | getCones (double &topCone, double &bottomCone) const |
void | getParams (Coord &top, Coord &bottom, double &radius, double &topCone, double &bottomCone) const |
The cylinder is defined by 2 coordinates (top and bottom), a radius, and the lengths of cones that can be drawn at its top or bottom. The height of each cone can be no more than half the cylinder's length (if it is longer, the cone will be drawn as having half the length of the cylinder).
Examples for cylinders with different parameters:
|
Default constructor. Initializes the radius to be DEFAULT_CYLINDER_RADIUS, and no cones (topCone=bottomCone=0). |
|
Constructor.
|
|
Get the bottom and top cone lengths.
|
|
Get the bottom and top coordinates.
|
|
Get all parameters.
|
|
Set the radius.
|
|
Set the bottom and top cone lengths.
|
|
Set the bottom and top coordinates.
|
|
Set all parameters.
|
|
Set the radius.
|