OpenMEEG
Loading...
Searching...
No Matches
OpenMEEG::Triangle Class Reference

Triangle Triangle class. More...

#include <triangle.h>

Public Types

typedef Vertex ** iterator
 
typedef const Vertex ** const_iterator
 

Public Member Functions

 Triangle ()
 Constructors.
 
 Triangle (Vertex *pts[3], const unsigned index=-1)
 Create a new triangle from a set of vertices.
 
 Triangle (Vertex *p1, Vertex *p2, Vertex *p3, const unsigned index=-1)
 Create a new triangle from a 3 vertex adresses.
 
 Triangle (Vertex &p1, Vertex &p2, Vertex &p3, const unsigned index=-1)
 Create a new triangle from a 3 vertices.
 
const_iterator begin () const
 Iterators.
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
bool operator== (const Triangle &T) const
 Operators.
 
Vertexvertex (const unsigned &vindex)
 
const Vertexvertex (const unsigned &vindex) const
 
Edge edge (const Vertex &V) const
 
Edges edges () const
 
Normalnormal ()
 
const Normalnormal () const
 
double area () const
 
double & area ()
 
unsigned & index ()
 
unsigned index () const
 
Vect3 center () const
 
bool contains (const Vertex &p) const
 
void change_orientation ()
 Change triangle orientation by flipping two of the vertices.
 
bool intersects (const Triangle &triangle) const
 Check for intersection with another triangle.
 

Detailed Description

Triangle Triangle class.

Definition at line 45 of file triangle.h.

Member Typedef Documentation

◆ iterator

Definition at line 48 of file triangle.h.

◆ const_iterator

Definition at line 49 of file triangle.h.

Constructor & Destructor Documentation

◆ Triangle() [1/4]

OpenMEEG::Triangle::Triangle ( )
inline

Constructors.

Definition at line 53 of file triangle.h.

◆ Triangle() [2/4]

OpenMEEG::Triangle::Triangle ( Vertex * pts[3],
const unsigned index = -1 )
inline

Create a new triangle from a set of vertices.

Definition at line 57 of file triangle.h.

◆ Triangle() [3/4]

OpenMEEG::Triangle::Triangle ( Vertex * p1,
Vertex * p2,
Vertex * p3,
const unsigned index = -1 )
inline

Create a new triangle from a 3 vertex adresses.

Definition at line 64 of file triangle.h.

◆ Triangle() [4/4]

OpenMEEG::Triangle::Triangle ( Vertex & p1,
Vertex & p2,
Vertex & p3,
const unsigned index = -1 )
inline

Create a new triangle from a 3 vertices.

Definition at line 68 of file triangle.h.

Member Function Documentation

◆ begin() [1/2]

const_iterator OpenMEEG::Triangle::begin ( ) const
inline

Iterators.

Definition at line 72 of file triangle.h.

◆ end() [1/2]

const_iterator OpenMEEG::Triangle::end ( ) const
inline

Definition at line 73 of file triangle.h.

◆ begin() [2/2]

iterator OpenMEEG::Triangle::begin ( )
inline

Definition at line 74 of file triangle.h.

◆ end() [2/2]

iterator OpenMEEG::Triangle::end ( )
inline

Definition at line 75 of file triangle.h.

◆ operator==()

bool OpenMEEG::Triangle::operator== ( const Triangle & T) const
inline

Operators.

Definition at line 79 of file triangle.h.

◆ vertex() [1/2]

Vertex & OpenMEEG::Triangle::vertex ( const unsigned & vindex)
inline

Definition at line 83 of file triangle.h.

◆ vertex() [2/2]

const Vertex & OpenMEEG::Triangle::vertex ( const unsigned & vindex) const
inline

Definition at line 84 of file triangle.h.

◆ edge()

Edge OpenMEEG::Triangle::edge ( const Vertex & V) const
inline

Definition at line 86 of file triangle.h.

◆ edges()

Edges OpenMEEG::Triangle::edges ( ) const
inline

Definition at line 91 of file triangle.h.

◆ normal() [1/2]

Normal & OpenMEEG::Triangle::normal ( )
inline

Definition at line 95 of file triangle.h.

◆ normal() [2/2]

const Normal & OpenMEEG::Triangle::normal ( ) const
inline

Definition at line 96 of file triangle.h.

◆ area() [1/2]

double OpenMEEG::Triangle::area ( ) const
inline

Definition at line 98 of file triangle.h.

◆ area() [2/2]

double & OpenMEEG::Triangle::area ( )
inline

Definition at line 99 of file triangle.h.

◆ index() [1/2]

unsigned & OpenMEEG::Triangle::index ( )
inline

Definition at line 101 of file triangle.h.

◆ index() [2/2]

unsigned OpenMEEG::Triangle::index ( ) const
inline

Definition at line 102 of file triangle.h.

◆ center()

Vect3 OpenMEEG::Triangle::center ( ) const
inline

Definition at line 104 of file triangle.h.

◆ contains()

bool OpenMEEG::Triangle::contains ( const Vertex & p) const
inline

Definition at line 106 of file triangle.h.

◆ change_orientation()

void OpenMEEG::Triangle::change_orientation ( )
inline

Change triangle orientation by flipping two of the vertices.

Definition at line 115 of file triangle.h.

◆ intersects()

bool OpenMEEG::Triangle::intersects ( const Triangle & triangle) const

Check for intersection with another triangle.


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