indexed polygon class that saves N indices to the N vertices of the polygon
More...
#include <Polygon.hpp>
|
| void | addVertex (const T &p) |
| | Adds a vertex to the polygon. More...
|
| |
| void | removeVertex (size_t idx) |
| | Removes vertex from the polygon. More...
|
| |
|
T & | getVertex (size_t idx) |
| | returns the index of vertex i of the triangle
|
| |
|
const T & | getVertex (size_t idx) const |
| | returns the index of vertex i of the triangle
|
| |
|
T & | operator[] (size_t i) |
| | get vertex at index i
|
| |
|
const T & | operator[] (size_t i) const |
| | get vertex at index i
|
| |
| size_t | size () const |
| | Number of vertices of this polygon. More...
|
| |
| T | computeCenter () |
| | Computes the center of the polygon as the average of all coordinates. More...
|
| |
|
|
std::vector< T > | _vertices |
| | Vertices making up the polygon.
|
| |
template<class T = rw::math::Vector3D<double>>
class rw::geometry::Polygon< T >
indexed polygon class that saves N indices to the N vertices of the polygon
◆ addVertex()
| void addVertex |
( |
const T & |
p | ) |
|
|
inline |
Adds a vertex to the polygon.
The point will be added to the end of the list of points
- Parameters
-
◆ computeCenter()
Computes the center of the polygon as the average of all coordinates.
- Returns
- Center of the polygon
◆ removeVertex()
| void removeVertex |
( |
size_t |
idx | ) |
|
|
inline |
Removes vertex from the polygon.
- Parameters
-
| idx | [in] Index of the vertex to remove |
◆ size()
Number of vertices of this polygon.
- Returns
- Number of vertices
The documentation for this class was generated from the following file: