Added Move and operator +
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/include/FTBBox.h b/include/FTBBox.h
index ea5da4e..91dbd8a 100755
--- a/include/FTBBox.h
+++ b/include/FTBBox.h
@@ -6,6 +6,7 @@
#include FT_GLYPH_H
#include "FTGL.h"
+#include "FTPoint.h"
/**
@@ -51,6 +52,32 @@ class FTGL_EXPORT FTBBox
~FTBBox()
{}
+
+ /**
+ * Move the Bounding Box by a vector.
+ *
+ * @param distance The distance to move the bbox in 3D space.
+ */
+ FTBBox Move( FTPoint distance)
+ {
+ lowerX += distance.x;
+ lowerY += distance.y;
+ lowerZ += distance.z;
+ upperX += distance.x;
+ upperY += distance.y;
+ upperZ += distance.z;
+ return *this;
+ }
+
+ /**
+ * Operator + Adds two FTBBox's together
+ *
+ * @param a
+ * @param b
+ * @return
+ */
+ friend FTBBox operator + ( const FTBBox &a, const FTBBox &b);
+
/**
* The bounds of the box
*/