#include <generic_components.h>
A class that represents a Topology set indices. It is composed by 3 arrays, a linear list of point indices, list of offsets that split the point list in outlines, and a list of the groups outline in complex elements (like a polygon with holes). It can also represents as set of line outlines, in which case the groups array will not be used and the closed array will containe the close status for each outline.
Public Member Functions | |
TopologyContainer ()=default | |
TopologyContainer (const Array< Int32 > &points, const Array< Int32 > &outlines, const Array< Int32 > &groups) | |
TopologyContainer (const Array< Int32 > &points, const Array< Int32 > &outlines, const Array< Bool > &closed) | |
MAXON_OPERATOR_EQUALITY_HASHCODE (TopologyContainer, _points, _outlines, _groups, _closed) | |
Result< void > | InitPolygons (Int32 pointCount=0, Int32 segCount=0, Int32 gorupCount=0) |
Result< void > | InitLines (Int32 pointCount=0, Int32 segCount=0) |
Bool | IsLine () const |
Bool | IsPolygon () const |
Bool | IsPopulated () const |
Bool | IsEmpty () const |
Bool | HasNgons () const |
Bool | HasGroups () const |
Int | GetGroupCount () const |
template<typename FN > | |
Result< void > | ForEachPolygonInTopology (FN &&fn) const |
Public Attributes | |
Array< Int32 > | _points |
Array< Int32 > | _outlines |
Array< Int32 > | _groups |
Array< Bool > | _closed |
|
default |
TopologyContainer | ( | const Array< Int32 > & | points, |
const Array< Int32 > & | outlines, | ||
const Array< Int32 > & | groups | ||
) |
TopologyContainer | ( | const Array< Int32 > & | points, |
const Array< Int32 > & | outlines, | ||
const Array< Bool > & | closed | ||
) |
MAXON_OPERATOR_EQUALITY_HASHCODE | ( | TopologyContainer | , |
_points | , | ||
_outlines | , | ||
_groups | , | ||
_closed | |||
) |
Bool IsLine | ( | ) | const |
Bool IsPolygon | ( | ) | const |
Bool IsPopulated | ( | ) | const |
Bool IsEmpty | ( | ) | const |
Bool HasNgons | ( | ) | const |
Bool HasGroups | ( | ) | const |
Int GetGroupCount | ( | ) | const |
Result<void> ForEachPolygonInTopology | ( | FN && | fn | ) | const |
A linear sequence of indices which represent all user polygon/polyline outlines.