Salome HOME
Replace oe by ?
[modules/smesh.git] / src / Tools / MeshCut / MeshCut_Carre.cxx
1 #include "MeshCut_Carre.hxx"
2
3 #include <iostream>
4
5 using namespace MESHCUT;
6 using namespace std;
7
8 Carre::Carre(float _x0, float _x1, float _y0, float _y1)
9 {
10   x0 = _x0;
11   x1 = _x1;
12   y0 = _y0;
13   y1 = _y1;
14 }
15
16 bool Carre::disjoint(Carre* c2)
17 {
18   return (x0 > c2->x1 || x1 < c2->x0 || y0 > c2->y1 || y1 < c2->y0);
19 }
20
21 bool Carre::contientNoeud(int ngnoeud, Maillage *MAILLAGE)
22 {
23   float x = *(MAILLAGE->XX + ngnoeud - 1);
24   float y = *(MAILLAGE->YY + ngnoeud - 1);
25   return (x >= x0 && x <= x1 && y >= y0 && y <= y1);
26 }
27
28 void Carre::affichage()
29 {
30   cout << "x0=" << x0 << " ";
31   cout << "x1=" << x1 << " ";
32   cout << "y0=" << y0 << " ";
33   cout << "y1=" << y1 << " ";
34 }
35