]> git.mxchange.org Git - simgear.git/blobdiff - simgear/bucket/newbucket.hxx
Melchior FRANZ:
[simgear.git] / simgear / bucket / newbucket.hxx
index da5288fba1b50c30b893456e40ba3473e38a2ca2..134d0b93ac47a19827b5c1a7dd3f6d0fc7a3614a 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Written by Curtis L. Olson, started February 1999.
  *
- * Copyright (C) 1999  Curtis L. Olson - curt@flightgear.org
+ * Copyright (C) 1999  Curtis L. Olson - http://www.flightgear.org/~curt
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -33,7 +33,7 @@
 #include <simgear/compiler.h>
 #include <simgear/constants.h>
 
-#ifdef FG_HAVE_STD_INCLUDES
+#ifdef SG_HAVE_STD_INCLUDES
 #  include <cmath>
 #  include <cstdio> // sprintf()
 #else
 #include STL_IOSTREAM
 
 // I don't understand ... <math.h> or <cmath> should be included
-// already depending on how you defined FG_HAVE_STD_INCLUDES, but I
+// already depending on how you defined SG_HAVE_STD_INCLUDES, but I
 // can go ahead and add this -- CLO
 #ifdef __MWERKS__
-FG_USING_STD(sprintf);
-FG_USING_STD(fabs);
+SG_USING_STD(sprintf);
+SG_USING_STD(fabs);
 #endif
 
 #include STL_STRING
 
-FG_USING_STD(string);
-
-#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-FG_USING_STD(ostream);
-#endif
+SG_USING_STD(string);
+SG_USING_STD(ostream);
 
 
 /**
@@ -193,6 +190,7 @@ public:
      *
      * 3 bits - to represent x (0 to 7)
      * 3 bits - to represent y (0 to 7)
+     * @return tile index
      */
     inline long int gen_index() const {
        return ((lon + 180) << 14) + ((lat + 90) << 6) + (y << 3) + x;
@@ -201,6 +199,7 @@ public:
     /**
      * Generate the unique scenery tile index for this bucket in ascii
      * string form.
+     * @return tile index in string form
      */
     inline string gen_index_str() const {
        char tmp[20];
@@ -211,11 +210,12 @@ public:
 
     /**
      * Build the base path name for this bucket.
+     * @return base path in string form
      */
     string gen_base_path() const;
 
     /**
-     * Return the center lon of a tile.
+     * @return the center lon of a tile.
      */
     inline double get_center_lon() const {
        double span = sg_bucket_span( lat + y / 8.0 + SG_HALF_BUCKET_SPAN );
@@ -228,51 +228,53 @@ public:
     }
 
     /**
-     * Return the center lat of a tile.
+     * @return the center lat of a tile.
      */
     inline double get_center_lat() const {
        return lat + y / 8.0 + SG_HALF_BUCKET_SPAN;
     }
 
     /**
-     * Return width of the tile in degrees.
+     * @return the width of the tile in degrees.
      */
     double get_width() const;
 
     /**
-     * Return height of the tile in degrees.
+     * @return the height of the tile in degrees.
      */
     double get_height() const;
 
     /**
-     * Return width of the tile in meters.
+     * @return the width of the tile in meters.
      */
     double get_width_m() const; 
 
     /**
-     * Return height of the tile in meters.
+     * @return the height of the tile in meters.
      */
     double get_height_m() const;
  
     // Informational methods.
 
     /**
-     * Return the lon of the lower left corner of this tile.
+     * @return the lon of the lower left corner of 
+     * the 1x1 chunk containing this tile.
      */
-    inline int get_lon() const { return lon; }
+    inline int get_chunk_lon() const { return lon; }
 
     /**
-     * Return the lat of the lower left corner of this tile.
+     * @return the lat of the lower left corner of 
+     * the 1x1 chunk containing this tile.
      */
-    inline int get_lat() const { return lat; }
+    inline int get_chunk_lat() const { return lat; }
 
     /**
-     * Return the x coord within the 1x1 degree chunk this tile.
+     * @return the x coord within the 1x1 degree chunk this tile.
      */
     inline int get_x() const { return x; }
 
     /**
-     * Return the y coord within the 1x1 degree chunk this tile.
+     * @return the y coord within the 1x1 degree chunk this tile.
      */
     inline int get_y() const { return y; }
 
@@ -284,17 +286,20 @@ public:
 
 
 /**
+ * \relates SGBucket
  * Return the bucket which is offset from the specified dlon, dlat by
  * the specified tile units in the X & Y direction.
  * @param dlon starting lon in degrees
  * @param dlat starting lat in degrees
  * @param x number of bucket units to offset in x (lon) direction
  * @param y number of bucket units to offset in y (lat) direction
+ * @return offset bucket
  */
 SGBucket sgBucketOffset( double dlon, double dlat, int x, int y );
 
 
 /**
+ * \relates SGBucket
  * Calculate the offset between two buckets (in quantity of buckets).
  * @param b1 bucket 1
  * @param b2 bucket 2
@@ -320,6 +325,7 @@ operator<< ( ostream& out, const SGBucket& b )
  * Compare two bucket structures for equality.
  * @param b1 bucket 1
  * @param b2 bucket 2
+ * @return comparison result
  */
 inline bool
 operator== ( const SGBucket& b1, const SGBucket& b2 )