Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Public Attributes | List of all members
Mezzanine::Graphics::Procedural::DelaunayTriangle Struct Reference

A triangle formed from 3 points in a Point2DContainer. More...

#include <triangulator.h>

+ Collaboration diagram for Mezzanine::Graphics::Procedural::DelaunayTriangle:

Public Types

enum  InsideType { IT_Inside = 0, IT_Outside = 1, IT_BorderlineOutside = 2 }
 An enum used to describe the proximity of a point to the edge of a Circumcircle generated by the Delaunay Triangulation algorithm. More...
 

Public Member Functions

 DelaunayTriangle (const Point2DContainer *List)
 Class constructor. More...
 
 ~DelaunayTriangle ()
 Class destructor.
 
Boole ContainsSegment (const Integer Index0, const Integer Index1) const
 Checks to see of the segment specified via Indexes is a part of this triangle. More...
 
Integer FindSegNumber (const Integer Index0, const Integer Index1) const
 Gets the index of a segment within this triangle.

Exceptions
Ifa valid segment index is not found then an INTERNAL_EXCEPTION will be thrown.
More...
 
String GetDebugDescription () const
 Gets a string description of this triangle. More...
 
Vector2 GetMidPoint () const
 Gets the central point of this triangle. More...
 
Vector2 GetPoint (const Integer Point) const
 Gets a point in the Point2DContainer by index. More...
 
Boole IsDegenerate () const
 Checks if this triangle is degenerate. More...
 
Boole IsPointInside (const Vector2 &Point) const
 Checks to see if a point is inside this triangle. More...
 
InsideType IsPointInsideCircumcircle (const Vector2 &Point) const
 Checks to see if a point is inside the Circumcircle generated from this triangle. More...
 
void MakeDirectIfNeeded ()
 Will conditionally re-arrange the vertices of this triangle.
 
Boole operator== (const DelaunayTriangle &Other) const
 Equality comparison operator. More...
 
void SetVertices (const Integer Index0, const Integer Index1, const Integer Index2)
 Sets the points that form this triangle. More...
 

Public Attributes

Integer Indexes [3]
 An array of indexes forming the triangle. More...
 
const Point2DContainerPoints
 An array of Vector2's that for all the triangles/segments being operated on.
 

Detailed Description

A triangle formed from 3 points in a Point2DContainer.

Definition at line 128 of file triangulator.h.

Member Enumeration Documentation

An enum used to describe the proximity of a point to the edge of a Circumcircle generated by the Delaunay Triangulation algorithm.

Enumerator
IT_Inside 

Returned when the specified point is inside the circumcircle.

IT_Outside 

Returned when the specified point is outside the circumcircle.

IT_BorderlineOutside 

Returned when the specified point is exceedingly close to being outside the circumcircle.

Definition at line 134 of file triangulator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::DelaunayTriangle::DelaunayTriangle ( const Point2DContainer List)

Class constructor.

Parameters
ListA pointer to the Point2DContainer this triangle resides in.

Definition at line 121 of file triangulator.cpp.

Member Function Documentation

Boole Mezzanine::Graphics::Procedural::DelaunayTriangle::ContainsSegment ( const Integer  Index0,
const Integer  Index1 
) const

Checks to see of the segment specified via Indexes is a part of this triangle.

Parameters
Index0The first point of the segment to check for.
Index1The second point of the segment to check for.
Returns
Returns true if the specified segment is a part of this triangle, false otherwise.

Definition at line 167 of file triangulator.cpp.

Integer Mezzanine::Graphics::Procedural::DelaunayTriangle::FindSegNumber ( const Integer  Index0,
const Integer  Index1 
) const

Gets the index of a segment within this triangle.

Exceptions
Ifa valid segment index is not found then an INTERNAL_EXCEPTION will be thrown.

Parameters
Index0The first index of the segment to search for.
Index1The second index of the segment to search for.
Returns
Returns 0-2 if a valid segment is found.

Definition at line 155 of file triangulator.cpp.

String Mezzanine::Graphics::Procedural::DelaunayTriangle::GetDebugDescription ( ) const

Gets a string description of this triangle.

Returns
Returns a String containing a description of this triangle.

Definition at line 220 of file triangulator.cpp.

Vector2 Mezzanine::Graphics::Procedural::DelaunayTriangle::GetMidPoint ( ) const

Gets the central point of this triangle.

Returns
Returns a Vector2 containing the central point of this triangle.

Definition at line 150 of file triangulator.cpp.

Vector2 Mezzanine::Graphics::Procedural::DelaunayTriangle::GetPoint ( const Integer  Point) const

Gets a point in the Point2DContainer by index.

Parameters
PointThe index of the point to retrieve.
Returns
Returns the point at the specified index.

Definition at line 145 of file triangulator.cpp.

Boole Mezzanine::Graphics::Procedural::DelaunayTriangle::IsDegenerate ( ) const

Checks if this triangle is degenerate.

Returns
Returns true if this triangle is degenerate, false otherwise.

Definition at line 213 of file triangulator.cpp.

Boole Mezzanine::Graphics::Procedural::DelaunayTriangle::IsPointInside ( const Vector2 Point) const

Checks to see if a point is inside this triangle.

Parameters
PointThe point to check.
Returns
Returns true if the specified point is inside this triangle, false otherwise.

Definition at line 173 of file triangulator.cpp.

DelaunayTriangle::InsideType Mezzanine::Graphics::Procedural::DelaunayTriangle::IsPointInsideCircumcircle ( const Vector2 Point) const

Checks to see if a point is inside the Circumcircle generated from this triangle.

Parameters
PointThe point to check.
Returns
Returns true if the the specified point is inside the Circumcircle generated by the Delaunay Triangulation algorithm from this triangle, false otherwise.

Definition at line 196 of file triangulator.cpp.

Boole Mezzanine::Graphics::Procedural::DelaunayTriangle::operator== ( const DelaunayTriangle Other) const

Equality comparison operator.

Parameters
OtherThe other DelaunayTriangle to compare with.
Returns
Returns true if ths other DelaunayTriangle buffer is equal to this one, false otherwise.

Definition at line 228 of file triangulator.cpp.

void Mezzanine::Graphics::Procedural::DelaunayTriangle::SetVertices ( const Integer  Index0,
const Integer  Index1,
const Integer  Index2 
)

Sets the points that form this triangle.

Parameters
Index0The first point in the Point2DContainer forming this triangle.
Index1The second point in the Point2DContainer forming this triangle.
Index2The third point in the Point2DContainer forming this triangle.

Definition at line 131 of file triangulator.cpp.

Member Data Documentation

Integer Mezzanine::Graphics::Procedural::DelaunayTriangle::Indexes[3]

An array of indexes forming the triangle.

Note
These indexes refer to Vector2's in a Point2DContainer.

Definition at line 143 of file triangulator.h.


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