|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a polygon with curved edges defined by BezierCurves. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.10.1/src/axom/primal/geometry/CurvedPolygon.hpp>
Public Types | |
| using | PointType = Point< T, NDIMS > |
| using | VectorType = Vector< T, NDIMS > |
| using | NumArrayType = NumericArray< T, NDIMS > |
| using | BezierCurveType = BezierCurve< T, NDIMS > |
| using | BoundingBoxType = typename BezierCurveType::BoundingBoxType |
Public Member Functions | |
| CurvedPolygon ()=default | |
| Default constructor for an empty polygon. More... | |
| CurvedPolygon (int nEdges) | |
| Constructor for an empty CurvedPolygon that reserves space for the given number of Edges. More... | |
| CurvedPolygon (BezierCurveType *curves, int nEdges) | |
| Constructor from an array of nEdges curves. More... | |
| void | clear () |
| Clears the list of edges. More... | |
| bool | empty () const |
| Returns true if the polygon has no edges. More... | |
| BezierCurveType & | operator[] (int idx) |
| const BezierCurveType & | operator[] (int idx) const |
| std::ostream & | print (std::ostream &os) const |
| Simple formatted print of a CurvedPolygon instance. More... | |
| bool | isClosed (double tol=1e-5) const |
| Check closedness of a CurvedPolygon. More... | |
| void | reverseOrientation () |
| Reverses orientation of a CurvedPolygon. More... | |
| BoundingBoxType | boundingBox () const |
| Returns an axis-aligned bounding box containing the CurvedPolygon. More... | |
Operations on edges | |
| int | numEdges () const |
| Return the number of edges in the polygon. More... | |
| void | setNumEdges (int ngon) |
| void | addEdge (const BezierCurveType &c1) |
| Appends a BezierCurve to the list of edges. More... | |
| void | splitEdge (int idx, T t) |
| Splits an edge "in place". More... | |
| axom::Array< BezierCurve< T, NDIMS > > | getEdges () const |
Friends | |
| bool | operator== (const CurvedPolygon< T, NDIMS > &lhs, const CurvedPolygon< T, NDIMS > &rhs) |
| Tests equality of two CurvedPolygons. More... | |
| bool | operator!= (const CurvedPolygon< T, NDIMS > &lhs, const CurvedPolygon< T, NDIMS > &rhs) |
| Tests inequality of two CurvedPolygons. More... | |
Represents a polygon with curved edges defined by BezierCurves.
| T | the coordinate type, e.g., double, float, etc. |
| NDIMS | the number of dimensions |
| using axom::primal::CurvedPolygon< T, NDIMS >::PointType = Point<T, NDIMS> |
| using axom::primal::CurvedPolygon< T, NDIMS >::VectorType = Vector<T, NDIMS> |
| using axom::primal::CurvedPolygon< T, NDIMS >::NumArrayType = NumericArray<T, NDIMS> |
| using axom::primal::CurvedPolygon< T, NDIMS >::BezierCurveType = BezierCurve<T, NDIMS> |
| using axom::primal::CurvedPolygon< T, NDIMS >::BoundingBoxType = typename BezierCurveType::BoundingBoxType |
|
default |
Default constructor for an empty polygon.
|
inlineexplicit |
Constructor for an empty CurvedPolygon that reserves space for the given number of Edges.
| [in] | numExpectedEdges | number of edges for which to reserve space |
References SLIC_ASSERT.
|
inline |
Constructor from an array of nEdges curves.
References axom::primal::CurvedPolygon< T, NDIMS >::addEdge(), and SLIC_ASSERT.
|
inline |
Clears the list of edges.
|
inline |
Returns true if the polygon has no edges.
|
inline |
Return the number of edges in the polygon.
|
inline |
References SLIC_ASSERT.
|
inline |
Appends a BezierCurve to the list of edges.
|
inline |
Splits an edge "in place".
References SLIC_ASSERT.
|
inline |
|
inline |
Retrieves the Bezier Curve at index idx
|
inline |
Retrieves the vertex at index idx
|
inline |
Simple formatted print of a CurvedPolygon instance.
| os | The output stream to write to |
References axom::primal::CurvedPolygon< T, NDIMS >::numEdges().
|
inline |
Check closedness of a CurvedPolygon.
A CurvedPolygon is closed when the endpoint of each edge coincides with startpoint of next edge
References axom::utilities::isNearlyEqual(), axom::primal::CurvedPolygon< T, NDIMS >::numEdges(), and axom::primal::squared_distance().
|
inline |
Reverses orientation of a CurvedPolygon.
References axom::primal::CurvedPolygon< T, NDIMS >::numEdges(), and axom::utilities::swap().
|
inline |
Returns an axis-aligned bounding box containing the CurvedPolygon.
|
friend |
Tests equality of two CurvedPolygons.
|
friend |
Tests inequality of two CurvedPolygons.