#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);
+SG_USING_STD(string);
-#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
-FG_USING_STD(ostream);
+#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
+SG_USING_STD(ostream);
#endif
*
* 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;
/**
* 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];
/**
* 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 );
}
/**
- * 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 this tile.
*/
inline int get_lon() const { return lon; }
/**
- * Return the lat of the lower left corner of this tile.
+ * @return the lat of the lower left corner of this tile.
*/
inline int get_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; }
/**
+ * \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
* 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 )