summaryrefslogtreecommitdiff
path: root/hge/CxImage/ximath.h
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-01-12 14:43:14 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-01-12 14:43:14 +0000
commitc91847d549cc1c30eb15504a15ea9a6d5aa48165 (patch)
treeb978d575f08f5f87d3c21eb9a024164636d1918a /hge/CxImage/ximath.h
downloadbullet-lab-remix-c91847d549cc1c30eb15504a15ea9a6d5aa48165.tar.xz
Diffstat (limited to 'hge/CxImage/ximath.h')
-rw-r--r--hge/CxImage/ximath.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/hge/CxImage/ximath.h b/hge/CxImage/ximath.h
new file mode 100644
index 0000000..014c14b
--- /dev/null
+++ b/hge/CxImage/ximath.h
@@ -0,0 +1,39 @@
+#if !defined(__ximath_h)
+#define __ximath_h
+
+#include "ximadef.h"
+
+//***bd*** simple floating point point
+class DLL_EXP CxPoint2
+{
+public:
+ CxPoint2();
+ CxPoint2(float const x_, float const y_);
+ CxPoint2(CxPoint2 const &p);
+
+ float Distance(CxPoint2 const p2);
+ float Distance(float const x_, float const y_);
+
+ float x,y;
+};
+
+//and simple rectangle
+class DLL_EXP CxRect2
+{
+public:
+ CxRect2();
+ CxRect2(float const x1_, float const y1_, float const x2_, float const y2_);
+ CxRect2(CxPoint2 const &bl, CxPoint2 const &tr);
+ CxRect2(CxRect2 const &p);
+
+ float Surface() const;
+ CxRect2 CrossSection(CxRect2 const &r2) const;
+ CxPoint2 Center() const;
+ float Width() const;
+ float Height() const;
+
+ CxPoint2 botLeft;
+ CxPoint2 topRight;
+};
+
+#endif