Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "MeshCut_Carre.hxx"
00021
00022 #include <iostream>
00023
00024 using namespace MESHCUT;
00025 using namespace std;
00026
00027 Carre::Carre(float _x0, float _x1, float _y0, float _y1)
00028 {
00029 x0 = _x0;
00030 x1 = _x1;
00031 y0 = _y0;
00032 y1 = _y1;
00033 }
00034
00035 bool Carre::disjoint(Carre* c2)
00036 {
00037 return (x0 > c2->x1 || x1 < c2->x0 || y0 > c2->y1 || y1 < c2->y0);
00038 }
00039
00040 bool Carre::contientNoeud(int ngnoeud, Maillage *MAILLAGE)
00041 {
00042 float x = *(MAILLAGE->XX + ngnoeud - 1);
00043 float y = *(MAILLAGE->YY + ngnoeud - 1);
00044 return (x >= x0 && x <= x1 && y >= y0 && y <= y1);
00045 }
00046
00047 void Carre::affichage()
00048 {
00049 cout << "x0=" << x0 << " ";
00050 cout << "x1=" << x1 << " ";
00051 cout << "y0=" << y0 << " ";
00052 cout << "y1=" << y1 << " ";
00053 }
00054