Moved these classes to there own files
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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
diff --git a/include/FTBBox.h b/include/FTBBox.h
new file mode 100755
index 0000000..c8918ea
--- /dev/null
+++ b/include/FTBBox.h
@@ -0,0 +1,64 @@
+#ifndef __FTBBox__
+#define __FTBBox__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_GLYPH_H
+
+#include "FTGL.h"
+
+
+/**
+ * FTBBox
+ *
+ *
+ */
+class FTGL_EXPORT FTBBox
+{
+ public:
+ FTBBox()
+ : lowerX(0),
+ lowerY(0),
+ lowerZ(0),
+ upperX(0),
+ upperY(0),
+ upperZ(0)
+ {}
+
+ FTBBox( FT_Glyph glyph)
+ {
+ FT_BBox bbox;
+ FT_Glyph_Get_CBox( glyph, ft_glyph_bbox_subpixels, &bbox );
+
+ lowerX = bbox.xMin >> 6;
+ lowerY = bbox.yMin >> 6;
+ lowerZ = 0;
+ upperX = bbox.xMax >> 6;
+ upperY = bbox.yMax >> 6;
+ upperZ = 0;
+ }
+
+ FTBBox( int a, int b, int c, int d, int e, int f)
+ : lowerX(a),
+ lowerY(b),
+ lowerZ(c),
+ upperX(d),
+ upperY(e),
+ upperZ(f)
+ {}
+
+ ~FTBBox()
+ {}
+
+ // Make these ftPoints & private
+ float lowerX, lowerY, lowerZ, upperX, upperY, upperZ;
+ protected:
+
+
+ private:
+
+};
+
+
+#endif // __FTBBox__
+
diff --git a/include/FTPoint.h b/include/FTPoint.h
new file mode 100755
index 0000000..1b70a48
--- /dev/null
+++ b/include/FTPoint.h
@@ -0,0 +1,76 @@
+#ifndef __FTPoint__
+#define __FTPoint__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_GLYPH_H
+
+#include "FTGL.h"
+
+/**
+ * FTPoint class is a basic 3 dimensional point or vector.
+ *
+ * @see FTOutlineGlyph
+ * @see FTPolyGlyph
+ *
+ */
+class FTGL_EXPORT FTPoint
+{
+ public:
+ /**
+ * Default constructor. Point is set to zero.
+ */
+ FTPoint()
+ : x(0), y(0), z(0)
+ {}
+
+ /**
+ * Constructor.
+ *
+ * @param X
+ * @param Y
+ * @param Z
+ */
+ FTPoint( const FTGL_DOUBLE X, const FTGL_DOUBLE Y, const FTGL_DOUBLE Z)
+ : x(X), y(Y), z(Z)
+ {}
+
+ /**
+ * Constructor.
+ *
+ * @param X
+ * @param Y
+ * @param Z
+ */
+ FTPoint( const FT_Vector& ft_vector)
+ : x(ft_vector.x), y(ft_vector.y), z(0)
+ {}
+
+ /**
+ * Operator == Tests for eqaulity
+ *
+ * @param a
+ * @param b
+ * @return
+ */
+ friend bool operator == ( const FTPoint &a, const FTPoint &b);
+
+ /**
+ * Operator != Tests for non equality
+ *
+ * @param a
+ * @param b
+ * @return
+ */
+ friend bool operator != ( const FTPoint &a, const FTPoint &b);
+
+ /**
+ * The point data
+ */
+ FTGL_DOUBLE x, y, z; // FIXME make private
+
+ private:
+};
+
+#endif // __FTPoint__
+
diff --git a/src/FTPoint.cpp b/src/FTPoint.cpp
new file mode 100755
index 0000000..e4678bc
--- /dev/null
+++ b/src/FTPoint.cpp
@@ -0,0 +1,14 @@
+#include "FTPoint.h"
+
+
+bool operator == ( const FTPoint &a, const FTPoint &b)
+{
+ return((a.x == b.x) && (a.y == b.y) && (a.z == b.z));
+}
+
+bool operator != ( const FTPoint &a, const FTPoint &b)
+{
+ return((a.x != b.x) || (a.y != b.y) || (a.z != b.z));
+}
+
+