Ocean
Ocean::Geometry::Delaunay::IndexEdge Class Reference

This class stores the sorted indices of an edge. More...

Public Member Functions

 IndexEdge (const unsigned int indexFirst, const unsigned int indexSecond)
 Creates a new edge object and sorts the provided two point indices to ensure that the first index is smaller than the second index. More...
 
 IndexEdge (const unsigned int indexFirst, const unsigned int indexSecond, const Vector2 *points)
 Creates a new edge object and sorts the provided two point indices to ensure that the point of the first index is 'smaller' than the point of the second index. More...
 
unsigned int firstIndex () const
 Returns the index of the first point. More...
 
unsigned int secondIndex () const
 Returns the index of the second point. More...
 
bool operator< (const IndexEdge &right) const
 Lesser operator for two edge objects. More...
 

Protected Attributes

unsigned int firstIndex_ = (unsigned int)(-1)
 The index of the first point. More...
 
unsigned int secondIndex_ = (unsigned int)(-1)
 The index of the second point. More...
 

Detailed Description

This class stores the sorted indices of an edge.

Constructor & Destructor Documentation

◆ IndexEdge() [1/2]

Ocean::Geometry::Delaunay::IndexEdge::IndexEdge ( const unsigned int  indexFirst,
const unsigned int  indexSecond 
)
inline

Creates a new edge object and sorts the provided two point indices to ensure that the first index is smaller than the second index.

Parameters
indexFirstThe index of the first point
indexSecondThe index of the second point, must be different from indexFirst

◆ IndexEdge() [2/2]

Ocean::Geometry::Delaunay::IndexEdge::IndexEdge ( const unsigned int  indexFirst,
const unsigned int  indexSecond,
const Vector2 points 
)
inline

Creates a new edge object and sorts the provided two point indices to ensure that the point of the first index is 'smaller' than the point of the second index.

Parameters
indexFirstThe index of the first point
indexSecondThe index of the second point, must be different from indexFirst
pointsThe points to be used for sorting, must be valid, ensure that enough points are provided

Member Function Documentation

◆ firstIndex()

unsigned int Ocean::Geometry::Delaunay::IndexEdge::firstIndex ( ) const
inline

Returns the index of the first point.

Returns
The point's first index

◆ operator<()

bool Ocean::Geometry::Delaunay::IndexEdge::operator< ( const IndexEdge right) const
inline

Lesser operator for two edge objects.

Parameters
rightThe second edge object to compare
Returns
True, if this edge object is 'lesser' than the second one

◆ secondIndex()

unsigned int Ocean::Geometry::Delaunay::IndexEdge::secondIndex ( ) const
inline

Returns the index of the second point.

Returns
The point's second index

Field Documentation

◆ firstIndex_

unsigned int Ocean::Geometry::Delaunay::IndexEdge::firstIndex_ = (unsigned int)(-1)
protected

The index of the first point.

◆ secondIndex_

unsigned int Ocean::Geometry::Delaunay::IndexEdge::secondIndex_ = (unsigned int)(-1)
protected

The index of the second point.


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