RobWorkProject  23.9.11-
Public Types | Public Member Functions | Protected Attributes | List of all members
IndexedPolygonN< T > Class Template Reference

Polygon with N vertice indices and 0 normals. More...

#include <IndexedPolygon.hpp>

Inherits IndexedPolygon< uint16_t >.

Public Types

typedef rw::core::Ptr< IndexedPolygonN< T > > Ptr
 Smart pointer to IndexedPolygonN.
 
- Public Types inherited from IndexedPolygon< uint16_t >
typedef rw::core::Ptr< IndexedPolygon< uint16_t > > Ptr
 Smart pointer to IndexedPolygonN.
 
typedef uint16_t value_type
 value type of the index pointer
 

Public Member Functions

 IndexedPolygonN ()
 Constructs IndexedPolygon with space for n vertices.
 
 IndexedPolygonN (size_t n)
 Constructs IndexedPolygon with space for n vertices.
 
 IndexedPolygonN (const std::vector< T > &vertices)
 Constructs IndexedPolygonN with the vertices specified.
 
virtual ~IndexedPolygonN ()
 destructor
 
T & getVertexIdx (size_t i)
 returns the index of vertex i of the triangle
 
const T & getVertexIdx (size_t i) const
 returns the index of vertex i of the triangle
 
void addVertex (const T &p)
 Adds a vertex to the polygon. More...
 
void removeVertexIdx (size_t i)
 Removes vertex from the polygon. More...
 
size_t size () const
 Number of vertices of this polygon. More...
 
- Public Member Functions inherited from IndexedPolygon< uint16_t >
virtual ~IndexedPolygon ()
 destructor
 
uint16_t & operator[] (size_t i)
 get vertex at index i
 
const uint16_t & operator[] (size_t i) const
 get vertex at index i
 

Protected Attributes

std::vector< T > _vertices
 The vertices of the polygon.
 

Detailed Description

template<class T = uint16_t>
class rw::geometry::IndexedPolygonN< T >

Polygon with N vertice indices and 0 normals.

Member Function Documentation

◆ 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
p[in] The point to add

◆ removeVertexIdx()

void removeVertexIdx ( size_t  i)
inline

Removes vertex from the polygon.

Parameters
i[in] Index of the point to remove

◆ size()

size_t size ( ) const
inlinevirtual

Number of vertices of this polygon.

Returns
Number of vertices

Implements IndexedPolygon< uint16_t >.


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