modm API documentation
modm::PointSet2D< T > Class Template Reference

Point set. More...

#include <modm/math/geometry/point_set_2d.hpp>

Public Typedefs

using SizeType = std::size_t
 
using PointType = Vector< T, 2 >
 
typedef modm::DynamicArray< PointType >::iterator iterator
 
typedef modm::DynamicArray< PointType >::const_iterator const_iterator
 

Public Member Functions

 PointSet2D (SizeType n=2)
 Constructs a set capable of holding n points (default = 2)
 
 PointSet2D (std::initializer_list< PointType > init)
 
 PointSet2D (const PointSet2D &other)
 
PointSet2D & operator= (const PointSet2D &other)
 
SizeType getNumberOfPoints () const
 Number of points contained in the set.
 
void append (const PointType &point)
 
PointTypeoperator[] (SizeType index)
 
const PointTypeoperator[] (SizeType index) const
 
void removeAll ()
 Remove all points.
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 

Protected Attributes

modm::DynamicArray< PointTypepoints
 

Detailed Description

template<typename T>
class modm::PointSet2D< T >

Point set.

Collection of points, represented by their corresponding vectors. Used for example to hold the result of a intersection-operation.

Based on the modm::DynamicArray class, therefore grows automatically if more space than currently allocated is needed. But because this is an expensive operation it should be avoid if possible.

Author
Fabian Greif

The documentation for this class was generated from the following file: