Commit 83da3d1a588ce67e56b096afd65de20f069be01a

henry 2002-11-27T06:35:56

Moved these classes to there own files

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));
+}
+
+