]> Creatis software - clitk.git/blob - utilities/CxImage/ximath.h
014c14b80ee932d81143856bda1d3f143ceca0c6
[clitk.git] / utilities / CxImage / ximath.h
1 #if !defined(__ximath_h)\r
2 #define __ximath_h\r
3 \r
4 #include "ximadef.h"\r
5 \r
6 //***bd*** simple floating point point\r
7 class DLL_EXP CxPoint2\r
8 {\r
9 public:\r
10   CxPoint2();\r
11   CxPoint2(float const x_, float const y_);\r
12   CxPoint2(CxPoint2 const &p);\r
13 \r
14   float Distance(CxPoint2 const p2);\r
15   float Distance(float const x_, float const y_);\r
16 \r
17   float x,y;\r
18 };\r
19 \r
20 //and simple rectangle\r
21 class DLL_EXP CxRect2\r
22 {\r
23 public:\r
24   CxRect2();\r
25   CxRect2(float const x1_, float const y1_, float const x2_, float const y2_);\r
26   CxRect2(CxPoint2 const &bl, CxPoint2 const &tr);\r
27   CxRect2(CxRect2 const &p);\r
28 \r
29   float Surface() const;\r
30   CxRect2 CrossSection(CxRect2 const &r2) const;\r
31   CxPoint2 Center() const;\r
32   float Width() const;\r
33   float Height() const;\r
34 \r
35   CxPoint2 botLeft;\r
36   CxPoint2 topRight;\r
37 };\r
38 \r
39 #endif\r