]> git.mxchange.org Git - flightgear.git/commitdiff
Added some informational methods.
authorcurt <curt>
Fri, 12 Mar 1999 22:51:18 +0000 (22:51 +0000)
committercurt <curt>
Fri, 12 Mar 1999 22:51:18 +0000 (22:51 +0000)
Bucket/newbucket.hxx

index b6cd70185252508665253cffd09bcce74fd32dc8..f85bbb25b3a88d0b1afb34ddd39353abdd3b5166 100644 (file)
@@ -76,9 +76,21 @@ public:
     // return the center lon of a tile
     double get_center_lon() const;
 
+    // return width of the tile
+    double get_width() const;
+
     // return the center lat of a tile
     double get_center_lat() const;
 
+    // return height of the tile
+    double get_height() const;
+
+    // Informational methods
+    inline int get_lon() const { return lon; }
+    inline int get_lat() const { return lat; }
+    inline int get_x() const { return x; }
+    inline int get_y() const { return y; }
+
     // friends
     friend ostream& operator<< ( ostream&, const FGBucket& );
     friend bool operator== ( const FGBucket&, const FGBucket& );
@@ -235,12 +247,24 @@ inline double FGBucket::get_center_lon() const {
 }
 
 
+// return width of the tile
+inline double FGBucket::get_width() const {
+    return bucket_span( get_center_lat() );
+}
+
+
 // return the center lat of a tile
 inline double FGBucket::get_center_lat() const {
     return lat + y / 8.0 + FG_HALF_BUCKET_SPAN;
 }
 
 
+// return height of the tile
+inline double FGBucket::get_height() const {
+    return FG_BUCKET_SPAN;
+}
+
+
 // offset a bucket struct by the specified tile units in the X & Y
 // direction
 FGBucket fgBucketOffset( double dlon, double dlat, int x, int y );
@@ -289,6 +313,9 @@ fgBucketGenIndex( const fgBUCKET& p )
 
 
 // $Log$
+// Revision 1.5  1999/03/12 22:51:18  curt
+// Added some informational methods.
+//
 // Revision 1.4  1999/03/02 01:01:43  curt
 // Tweaks for compiling with native SGI compilers.
 //