Vertex Set. More...
#include <VertexSet.hpp>
Public Types | |
using | const_pointer = const Length2 * |
Constant pointer type. | |
Public Member Functions | |
VertexSet (Area minSepSquared=GetDefaultMinSeparationSquared()) | |
Initializing constructor. | |
Area | GetMinSeparationSquared () const noexcept |
Gets the min separation squared. | |
bool | add (Length2 value) |
Adds the given vertex into the set if allowed. | |
void | clear () noexcept |
Clear this set. | |
std::size_t | size () const noexcept |
Gets the current size of this set. | |
const_pointer | data () const |
Gets the pointer to the data buffer. | |
const_pointer | begin () const |
Gets the "begin" iterator value. | |
const_pointer | end () const |
Gets the "end" iterator value. | |
const_pointer | find (Length2 value) const |
Finds contained point whose delta with the given point has a squared length less than or equal to this set's minimum length squared value. | |
Length2 | operator[] (std::size_t index) const noexcept |
Indexed access. | |
Static Public Member Functions | |
static Area | GetDefaultMinSeparationSquared () |
Gets the default minimum separation squared value. | |
Private Attributes | |
std::vector< Length2 > | m_elements |
Elements. | |
const Area | m_minSepSquared |
Minimum length squared. sizeof(Vec2)/2 or 4-bytes. | |
Vertex Set.
This is a container that enforces the invariant that no two vertices can be closer together than the minimum separation distance.