Ocean
Ocean::Geometry::Delaunay::IndexTriangle Class Reference

This class holds three indices of points representing a triangle. More...

Inheritance diagram for Ocean::Geometry::Delaunay::IndexTriangle:

Public Member Functions

 IndexTriangle ()
 Creates an invalid index triangle object. More...
 
 IndexTriangle (const unsigned int index0, const unsigned int index1, const unsigned int index2)
 Creates a new index triangle object. More...
 
unsigned int index0 () const
 Returns the first index. More...
 
unsigned int index1 () const
 Returns the second index. More...
 
unsigned int index2 () const
 Returns the third index. More...
 
bool isValid () const
 Returns whether three individual indices are stored. More...
 
unsigned int operator[] (const unsigned int n) const
 Returns one index of this triangle. More...
 
bool operator== (const IndexTriangle &second) const
 Returns whether two triangles are equal (i.e. More...
 
Triangle2 triangle2 (const Vector2 *points) const
 Creates a 2D triangle with positions as corners from this index triangle. More...
 
Triangle3 triangle3 (const Vector3 *points) const
 Creates a 3D triangle with positions as corners from this index triangle. More...
 

Protected Attributes

unsigned int indices_ [3]
 Triangle indices;. More...
 

Detailed Description

This class holds three indices of points representing a triangle.

Constructor & Destructor Documentation

◆ IndexTriangle() [1/2]

Ocean::Geometry::Delaunay::IndexTriangle::IndexTriangle ( )
inline

Creates an invalid index triangle object.

◆ IndexTriangle() [2/2]

Ocean::Geometry::Delaunay::IndexTriangle::IndexTriangle ( const unsigned int  index0,
const unsigned int  index1,
const unsigned int  index2 
)
inline

Creates a new index triangle object.

Parameters
index0First index
index1Second index
index2Third index

Member Function Documentation

◆ index0()

unsigned int Ocean::Geometry::Delaunay::IndexTriangle::index0 ( ) const
inline

Returns the first index.

First triangle index

◆ index1()

unsigned int Ocean::Geometry::Delaunay::IndexTriangle::index1 ( ) const
inline

Returns the second index.

Second triangle index

◆ index2()

unsigned int Ocean::Geometry::Delaunay::IndexTriangle::index2 ( ) const
inline

Returns the third index.

Third triangle index

◆ isValid()

bool Ocean::Geometry::Delaunay::IndexTriangle::isValid ( ) const
inline

Returns whether three individual indices are stored.

Returns
True, if so

◆ operator==()

bool Ocean::Geometry::Delaunay::IndexTriangle::operator== ( const IndexTriangle second) const
inline

Returns whether two triangles are equal (i.e.

whether both triangles are composed with the same indices, independent of their order).

Parameters
secondThe second triangle to test
Returns
True, if both triangles are equal

◆ operator[]()

unsigned int Ocean::Geometry::Delaunay::IndexTriangle::operator[] ( const unsigned int  n) const
inline

Returns one index of this triangle.

Parameters
nThe (corner) index of the triangle for which the index is returned, with range [0, 2]
Returns
The requested index

◆ triangle2()

Triangle2 Ocean::Geometry::Delaunay::IndexTriangle::triangle2 ( const Vector2 points) const
inline

Creates a 2D triangle with positions as corners from this index triangle.

Beware: The number of points in the provided set, must exceed the maximal index, no check is done!

Parameters
pointsThe set of points from which the corners are taken

◆ triangle3()

Triangle3 Ocean::Geometry::Delaunay::IndexTriangle::triangle3 ( const Vector3 points) const
inline

Creates a 3D triangle with positions as corners from this index triangle.

Beware: The number of points in the provided set, must exceed the maximal index, not check is done!

Parameters
pointsThe set of points from which the corners are taken

Field Documentation

◆ indices_

unsigned int Ocean::Geometry::Delaunay::IndexTriangle::indices_[3]
protected

Triangle indices;.


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