Commit 390f4520f3e354ee2bba352b84d6bc618aa3e994

henry 2002-11-27T07:12:59

Moved FTPoint to it's own file

diff --git a/include/FTVectoriser.h b/include/FTVectoriser.h
index 7fe2f1d..902066c 100644
--- a/include/FTVectoriser.h
+++ b/include/FTVectoriser.h
@@ -5,69 +5,15 @@
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 
+#include "FTPoint.h"
+#include "FTVector.h"
 #include "FTGL.h"
 
-#include "FTVector.h"
 
 #ifndef CALLBACK
 #define CALLBACK
 #endif
 
-/**
- * ftPoint class is a basic 3 dimensional point for holding vector font
- * point data.
- *
- * @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)
-        {}
-        
-        /**
-         * 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:
-};
-
 
 /**
  * FTContour class is a container of points that describe a vector font
@@ -128,7 +74,7 @@ class FTGL_EXPORT FTContour
         /**
          *  The list of points in this contour
          */
-        typedef FTVector<ftPoint> PointVector;
+        typedef FTVector<FTPoint> PointVector;
         PointVector pointList;
         
     private:
@@ -157,14 +103,14 @@ class FTGL_EXPORT FTTesselation
         
         void AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z)
         {   
-            pointList.push_back( ftPoint( x, y, z));
+            pointList.push_back( FTPoint( x, y, z));
         }
 
 
         size_t size() const { return pointList.size();}
 
         GLenum meshType;
-        typedef FTVector<ftPoint> PointVector;
+        typedef FTVector<FTPoint> PointVector;
         PointVector pointList;
         
     private:
@@ -188,7 +134,7 @@ class FTGL_EXPORT FTMesh
         void Error( GLenum e) { err = e;}
         GLenum Error() const { return err;}
 
-        typedef FTVector<ftPoint> PointVector;
+        typedef FTVector<FTPoint> PointVector;
         PointVector tempPool;
         
         typedef FTVector<FTTesselation*> TesselationVector;
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index d4fac13..cc9dc25 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -7,7 +7,6 @@
 #endif
 
 
-
 void CALLBACK ftglError( GLenum errCode, FTMesh* mesh)
 {
     mesh->Error( errCode);
@@ -35,23 +34,10 @@ void CALLBACK ftglEnd( FTMesh* mesh)
 void CALLBACK ftglCombine( FTGL_DOUBLE coords[3], void* vertex_data[4], GLfloat weight[4], void** outData, FTMesh* mesh)
 {
     FTGL_DOUBLE* vertex = (FTGL_DOUBLE*)coords;
-    mesh->tempPool.push_back( ftPoint( vertex[0], vertex[1], vertex[2]));
+    mesh->tempPool.push_back( FTPoint( vertex[0], vertex[1], vertex[2]));
     
     *outData = &mesh->tempPool[ mesh->tempPool.size() - 1].x;
 }
-
-
-//=============================================================================
-
-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));
-}
         
 
 FTMesh::FTMesh()