#include <stack>#include <fstream>#include "triangulation.hpp"#include <cstdlib>#include <map>#include <set>

Go to the source code of this file.
Defines | |
| #define | ALTERNATE_INCIRCLE |
| #define | DEBUG_FIND |
| #define | STEP_WRITE |
| #define | STANDALONE |
Functions | |
| template<class FLT> | |
| FLT | sqr (const FLT &x) |
| int | myrand (const int width) |
| double | SDet (const Vertex &V1, const Vertex &V2, const Vertex &V3) |
| Produit vectoriel spécialisé 2D. | |
| bool | checkInter (const Vertex &P1, const Vertex &P2, const Vertex &Q1, const Vertex &Q2) |
| double | Angle (const Vertex &V1, const Vertex &V2, const Vertex &V3) |
| #define ALTERNATE_INCIRCLE |
Definition at line 32 of file triangulation.cpp.
| #define DEBUG_FIND |
Definition at line 33 of file triangulation.cpp.
| #define STANDALONE |
Definition at line 36 of file triangulation.cpp.
| #define STEP_WRITE |
Definition at line 35 of file triangulation.cpp.
Definition at line 76 of file triangulation.cpp.
References sqr().
00076 { // cos de l'angle * ||V2-V1|| (V1 point pivot) 00077 const double distance = sqrt(sqr(V3[0]-V1[0])+sqr(V3[1]-V1[1])); 00078 return (((V2[0]-V1[0])*(V3[0]-V1[0]))+((V2[1]-V1[1])*(V3[1]-V1[1])))/distance; 00079 }

| bool checkInter | ( | const Vertex & | P1, | |
| const Vertex & | P2, | |||
| const Vertex & | Q1, | |||
| const Vertex & | Q2 | |||
| ) | [inline] |
Definition at line 70 of file triangulation.cpp.
References ASSERT, and SDet().
Referenced by Triangulation::__checkLine().
00070 { 00071 // retourne true si P1P2 inter Q1Q2 != vide 00072 ASSERT(!(P1 == P2 || P1 == Q1 || P1 == Q2 || P2 == Q1 || P2 == Q2 || Q1 == Q2)); 00073 return (SDet(P1,P2,Q1)*SDet(P1,P2,Q2) < 0) && (SDet(Q1,Q2,P1)*SDet(Q1,Q2,P2) < 0); // version optimisée 00074 }

| int myrand | ( | const int | width | ) |
| FLT sqr | ( | const FLT & | x | ) | [inline] |
1.5.6