]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_binobj.hxx
Async lookup attempt #3 - use OpenThreads instead - I'm going to kill off SGThread...
[simgear.git] / simgear / io / sg_binobj.hxx
index d5c108fc15f805e978bf59ec298aa1a76299868e..7f6726407ef0ec37e2f737b62ac6c08d05487a44 100644 (file)
@@ -28,8 +28,6 @@
 #define _SG_BINOBJ_HXX
 
 
-#include <plib/sg.h>
-
 #include <simgear/compiler.h>
 #include <simgear/constants.h>
 #include <simgear/math/sg_types.hxx>
 #include <time.h>
 
 #include <list>
-#include STL_STRING
+#include <string>
 
 
 
 /** STL Structure used to store object information */
-typedef vector < int_list > group_list;
+typedef std::vector < int_list > group_list;
 typedef group_list::iterator group_list_iterator;
 typedef group_list::const_iterator const_group_list_iterator;
 
@@ -125,9 +123,7 @@ public:
 
     inline unsigned short get_version() const { return version; }
 
-    inline Point3D get_gbs_center() const { return Point3D::fromSGVec3(gbs_center); }
-    inline void set_gbs_center( const Point3D& p ) { gbs_center = p.toSGVec3d(); }
-    inline const SGVec3d& get_gbs_center2() const { return gbs_center; }
+    inline const SGVec3d& get_gbs_center() const { return gbs_center; }
     inline void set_gbs_center( const SGVec3d& p ) { gbs_center = p; }
 
     inline float get_gbs_radius() const { return gbs_radius; }
@@ -137,40 +133,16 @@ public:
     { return wgs84_nodes; }
     inline void set_wgs84_nodes( const std::vector<SGVec3d>& n )
     { wgs84_nodes = n; }
-    inline void set_wgs84_nodes( const point_list& n )
-    {
-      wgs84_nodes.resize(n.size());
-      for (unsigned i = 0; i < wgs84_nodes.size(); ++i)
-        wgs84_nodes[i] = n[i].toSGVec3d();
-    }
 
     inline const std::vector<SGVec4f>& get_colors() const { return colors; }
     inline void set_colors( const std::vector<SGVec4f>& c ) { colors = c; }
-    inline void set_colors( const point_list& c )
-    {
-      colors.resize(c.size());
-      for (unsigned i = 0; i < colors.size(); ++i)
-        colors[i] = SGVec4f(c[i].toSGVec3f(), 1);
-    }
-
+    
     inline const std::vector<SGVec3f>& get_normals() const { return normals; }
     inline void set_normals( const std::vector<SGVec3f>& n ) { normals = n; }
-    inline void set_normals( const point_list& n )
-    {
-      normals.resize(n.size());
-      for (unsigned i = 0; i < normals.size(); ++i)
-        normals[i] = n[i].toSGVec3f();
-    }
-
+    
     inline const std::vector<SGVec2f>& get_texcoords() const { return texcoords; }
     inline void set_texcoords( const std::vector<SGVec2f>& t ) { texcoords = t; }
-    inline void set_texcoords( const point_list& t )
-    {
-      texcoords.resize(t.size());
-      for (unsigned i = 0; i < texcoords.size(); ++i)
-        texcoords[i] = t[i].toSGVec2f();
-    }
-
+    
     inline const group_list& get_pts_v() const { return pts_v; }
     inline void set_pts_v( const group_list& g ) { pts_v = g; }
     inline const group_list& get_pts_n() const { return pts_n; }
@@ -222,7 +194,7 @@ public:
      * @param file input file name
      * @return result of read
      */
-    bool read_bin( const string& file );
+    bool read_bin( const std::string& file );
 
     /** 
      * Write out the structures to a binary file.  We assume that the
@@ -233,7 +205,7 @@ public:
      * @param b bucket for object location
      * @return result of write
      */
-    bool write_bin( const string& base, const string& name, const SGBucket& b );
+    bool write_bin( const std::string& base, const std::string& name, const SGBucket& b );
 
     /**
      * Write out the structures to an ASCII file.  We assume that the
@@ -244,30 +216,8 @@ public:
      * @param b bucket for object location
      * @return result of write
      */
-    bool write_ascii( const string& base, const string& name,
+    bool write_ascii( const std::string& base, const std::string& name,
                      const SGBucket& b );
 };
 
-
-/**
- * \relates SGBinObject
- * Calculate the center of a list of points, by taking the halfway
- * point between the min and max points.
- * @param wgs84_nodes list of points in wgs84 coordinates
- * @return center point
- */
-Point3D sgCalcCenter( point_list& wgs84_nodes );
-
-
-/**
- * \relates SGBinObject
- * Calculate the bounding sphere of a set of nodes.
- * Center is the center of the tile and zero elevation.
- * @param center center of our bounding radius
- * @param wgs84_nodes list of points in wgs84 coordinates
- * @return radius
- */
-double sgCalcBoundingRadius( Point3D center, point_list& wgs84_nodes );
-
-
 #endif // _SG_BINOBJ_HXX