Atoms Crowd  7.0.0
AtomsUtils::Triangle2 Class Reference

Triangle 2D class. More...

#include <Triangle.h>

Public Member Functions

 Triangle2 ()
 Constructor.
 
 Triangle2 (const AtomsMath::Vector2f &v0, const AtomsMath::Vector2f &v1, const AtomsMath::Vector2f &v2, unsigned int id=0)
 Constructor. More...
 
 Triangle2 (const AtomsMath::Vector2f &v0, const AtomsMath::Vector2f &v1, const AtomsMath::Vector2f &v2, const unsigned int p0Id, const unsigned int p1Id, const unsigned int p2Id)
 
 ~Triangle2 ()
 Destructor.
 
bool contains (const unsigned int index) const
 
bool isEqual (const Triangle2 &other) const
 
void makeCounterClockWise ()
 
double distanceToCenter (const AtomsMath::Vector2f &point) const
 
double distanceTo (const AtomsMath::Vector2f &point) const
 
AtomsMath::Vector2f closestPoint (const AtomsMath::Vector2f &point, float &outU, float &outV, float &sqrDistance) const
 

Public Attributes

AtomsMath::Vector2f p0
 Vertex 0.
 
AtomsMath::Vector2f p1
 Vertex 1.
 
AtomsMath::Vector2f p2
 Vertex 2.
 
unsigned int p0Id
 Vertex 0 id.
 
unsigned int p1Id
 Vertex 1 id.
 
unsigned int p2Id
 Vertex 2 id.
 
unsigned int id
 Triangle id.
 

Detailed Description

Triangle 2D class.

Constructor & Destructor Documentation

◆ Triangle2()

AtomsUtils::Triangle2::Triangle2 ( const AtomsMath::Vector2f &  v0,
const AtomsMath::Vector2f &  v1,
const AtomsMath::Vector2f &  v2,
unsigned int  id = 0 
)

Constructor.

Parameters
v0Vertex 0
v1Vertex 1
v2Vertex 2
idTriangle id

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