These static properties control how circular shapes are quantized by default on construction. More...
#include <common.h>
Static Public Member Functions | |
static void | SetMinCircularAngle (double angle) |
static void | SetMinCircularEdgeLength (double length) |
static void | SetCircularSegments (int number) |
static int | GetCircularSegments (double radius) |
static void | ResetToDefaults () |
These static properties control how circular shapes are quantized by default on construction.
If circularSegments is specified, it takes precedence. If it is zero, then instead the minimum is used of the segments calculated based on edge length and angle, rounded up to the nearest multiple of four. To get numbers not divisible by four, circularSegments must be specified.
|
inlinestatic |
Sets an angle constraint the default number of circular segments for the CrossSection::Circle(), Manifold::Cylinder(), Manifold::Sphere(), and Manifold::Revolve() constructors. The number of segments will be rounded up to the nearest factor of four.
angle | The minimum angle in degrees between consecutive segments. The angle will increase if the the segments hit the minimum edge length. Default is 10 degrees. |
|
inlinestatic |
Sets a length constraint the default number of circular segments for the CrossSection::Circle(), Manifold::Cylinder(), Manifold::Sphere(), and Manifold::Revolve() constructors. The number of segments will be rounded up to the nearest factor of four.
length | The minimum length of segments. The length will increase if the the segments hit the minimum angle. Default is 1.0. |
|
inlinestatic |
Sets the default number of circular segments for the CrossSection::Circle(), Manifold::Cylinder(), Manifold::Sphere(), and Manifold::Revolve() constructors. Overrides the edge length and angle constraints and sets the number of segments to exactly this value.
number | Number of circular segments. Default is 0, meaning no constraint is applied. |
|
inlinestatic |
Determine the result of the SetMinCircularAngle(), SetMinCircularEdgeLength(), and SetCircularSegments() defaults.
radius | For a given radius of circle, determine how many default segments there will be. |
|
inlinestatic |
Resets the circular construction parameters to their defaults if SetMinCircularAngle, SetMinCircularEdgeLength, or SetCircularSegments have been called.