OpenMEEG
Public Types | Public Member Functions | Private Attributes | List of all members
OpenMEEG::Triangle Class Reference

Triangle. More...

#include <triangle.h>

Collaboration diagram for OpenMEEG::Triangle:
Collaboration graph
[legend]

Public Types

typedef Vertex ** iterator
 
typedef const Vertex ** const_iterator
 

Public Member Functions

 Triangle ()
 Constructors. More...
 
 Triangle (Vertex *pts[3], const unsigned index=-1)
 Create a new triangle from a set of vertices. More...
 
 Triangle (Vertex &p1, Vertex &p2, Vertex &p3, const unsigned index=-1)
 Create a new triangle from a 3 vertices. More...
 
 Triangle (Vertex *p1, Vertex *p2, Vertex *p3, const unsigned index=-1)
 Create a new triangle from a 3 vertex adresses. More...
 
Vertexoperator[] (const unsigned &vindex)
 Operators. More...
 
const Vertexoperator[] (const unsigned &vindex) const
 
Vertexoperator() (const unsigned &vindex)
 
const Vertexoperator() (const unsigned &vindex) const
 
bool operator== (const Triangle &T) const
 
Vertexvertex (const unsigned &vindex)
 
const Vertexvertex (const unsigned &vindex) const
 
const_iterator begin () const
 Iterators. More...
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
const Vertexs1 () const
 
const Vertexs2 () const
 
const Vertexs3 () const
 
Vertexs1 ()
 
Vertexs2 ()
 
Vertexs3 ()
 
Normalnormal ()
 
const Normalnormal () const
 
double & area ()
 
const double & area () const
 
unsigned & index ()
 
const unsigned & index () const
 
const Vertexprev (const Vertex &V) const
 
const Vertexnext (const Vertex &V) const
 
Vect3 center () const
 
bool contains (const Vertex &p) const
 
void flip ()
 flip two of the three vertex address More...
 

Private Attributes

Vertexvertices_ [3]
 &Vertex-triplet defining the triangle More...
 
double area_
 Area. More...
 
Normal normal_
 Normal. More...
 
unsigned ind
 Index of the triangle. More...
 

Detailed Description

Triangle.

Triangle class

Definition at line 54 of file triangle.h.

Member Typedef Documentation

◆ iterator

Definition at line 57 of file triangle.h.

◆ const_iterator

Definition at line 58 of file triangle.h.

Constructor & Destructor Documentation

◆ Triangle() [1/4]

OpenMEEG::Triangle::Triangle ( )
inline

Constructors.

Definition at line 62 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 66 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 vertices.

Definition at line 73 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 vertex adresses.

Definition at line 81 of file triangle.h.

Member Function Documentation

◆ operator[]() [1/2]

Vertex* OpenMEEG::Triangle::operator[] ( const unsigned &  vindex)
inline

Operators.

Definition at line 90 of file triangle.h.

◆ operator[]() [2/2]

const Vertex* OpenMEEG::Triangle::operator[] ( const unsigned &  vindex) const
inline

Definition at line 91 of file triangle.h.

◆ operator()() [1/2]

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

Definition at line 92 of file triangle.h.

◆ operator()() [2/2]

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

Definition at line 93 of file triangle.h.

◆ operator==()

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

Definition at line 95 of file triangle.h.

◆ vertex() [1/2]

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

Definition at line 97 of file triangle.h.

◆ vertex() [2/2]

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

Definition at line 98 of file triangle.h.

◆ begin() [1/2]

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

Iterators.

Definition at line 102 of file triangle.h.

◆ end() [1/2]

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

Definition at line 103 of file triangle.h.

◆ begin() [2/2]

iterator OpenMEEG::Triangle::begin ( )
inline

Definition at line 104 of file triangle.h.

◆ end() [2/2]

iterator OpenMEEG::Triangle::end ( )
inline

Definition at line 105 of file triangle.h.

◆ s1() [1/2]

const Vertex& OpenMEEG::Triangle::s1 ( ) const
inline

Definition at line 109 of file triangle.h.

◆ s2() [1/2]

const Vertex& OpenMEEG::Triangle::s2 ( ) const
inline

Definition at line 110 of file triangle.h.

◆ s3() [1/2]

const Vertex& OpenMEEG::Triangle::s3 ( ) const
inline

Definition at line 111 of file triangle.h.

◆ s1() [2/2]

Vertex& OpenMEEG::Triangle::s1 ( )
inline

Definition at line 113 of file triangle.h.

◆ s2() [2/2]

Vertex& OpenMEEG::Triangle::s2 ( )
inline

Definition at line 114 of file triangle.h.

◆ s3() [2/2]

Vertex& OpenMEEG::Triangle::s3 ( )
inline

Definition at line 115 of file triangle.h.

◆ normal() [1/2]

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

Definition at line 117 of file triangle.h.

◆ normal() [2/2]

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

Definition at line 118 of file triangle.h.

◆ area() [1/2]

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

Definition at line 120 of file triangle.h.

◆ area() [2/2]

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

Definition at line 121 of file triangle.h.

◆ index() [1/2]

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

Definition at line 123 of file triangle.h.

◆ index() [2/2]

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

Definition at line 124 of file triangle.h.

◆ prev()

const Vertex& OpenMEEG::Triangle::prev ( const Vertex V) const
inline

Definition at line 128 of file triangle.h.

◆ next()

const Vertex& OpenMEEG::Triangle::next ( const Vertex V) const
inline

Definition at line 140 of file triangle.h.

◆ center()

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

Definition at line 153 of file triangle.h.

◆ contains()

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

Definition at line 157 of file triangle.h.

◆ flip()

void OpenMEEG::Triangle::flip ( )
inline

flip two of the three vertex address

Definition at line 166 of file triangle.h.

Member Data Documentation

◆ vertices_

Vertex* OpenMEEG::Triangle::vertices_[3]
private

&Vertex-triplet defining the triangle

Definition at line 170 of file triangle.h.

◆ area_

double OpenMEEG::Triangle::area_
private

Area.

Definition at line 171 of file triangle.h.

◆ normal_

Normal OpenMEEG::Triangle::normal_
private

Normal.

Definition at line 172 of file triangle.h.

◆ ind

unsigned OpenMEEG::Triangle::ind
private

Index of the triangle.

Definition at line 173 of file triangle.h.


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