Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::ConvexPolygon::Iterator Class Reference

#include <ConvexPolygon.h>

Public Member Functions

PolygonEdge edge () const
 Create a directed edge between this and the next point. More...
 
 Iterator (const ConvexPolygon &polygon)
 Constructor. More...
 
const Kernel::V2Doperator* () const
 Dereference operator. More...
 
void operator++ ()
 Prefix increment operator. More...
 

Private Member Functions

size_t nextIndex () const
 Compute the next index. More...
 

Private Attributes

size_t m_index
 
const ConvexPolygonm_polygon
 

Detailed Description

Definition at line 45 of file ConvexPolygon.h.

Constructor & Destructor Documentation

◆ Iterator()

Mantid::Geometry::ConvexPolygon::Iterator::Iterator ( const ConvexPolygon polygon)

Constructor.

Parameters
polygonA reference to the initializing polygon

Definition at line 22 of file ConvexPolygonIterator.cpp.

References Mantid::Geometry::ConvexPolygon::isValid().

Member Function Documentation

◆ edge()

PolygonEdge Mantid::Geometry::ConvexPolygon::Iterator::edge ( ) const

Create a directed edge between this and the next point.

Returns
A PolygonEdge defining the edge with the current point and the next

Definition at line 42 of file ConvexPolygonIterator.cpp.

Referenced by Mantid::Geometry::intersection().

◆ nextIndex()

size_t Mantid::Geometry::ConvexPolygon::Iterator::nextIndex ( ) const
private

Compute the next index.

Returns
The next index, taking into account cycling back after npoints()

Definition at line 48 of file ConvexPolygonIterator.cpp.

◆ operator*()

const Kernel::V2D & Mantid::Geometry::ConvexPolygon::Iterator::operator* ( ) const

Dereference operator.

Returns
Dereference the iterator and return the current value

Definition at line 31 of file ConvexPolygonIterator.cpp.

◆ operator++()

void Mantid::Geometry::ConvexPolygon::Iterator::operator++ ( )

Prefix increment operator.

Advance the iterator to the next point.

When the iterator points to the last point the next increment will take it back to the "first" point.

Definition at line 37 of file ConvexPolygonIterator.cpp.

Member Data Documentation

◆ m_index

size_t Mantid::Geometry::ConvexPolygon::Iterator::m_index
private

Definition at line 62 of file ConvexPolygon.h.

◆ m_polygon

const ConvexPolygon& Mantid::Geometry::ConvexPolygon::Iterator::m_polygon
private

Definition at line 61 of file ConvexPolygon.h.


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