X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmisc%2Ftexcoord.cxx;h=2705980d1c96db73cc04ed30c65878f49aface37;hb=2e71b64de1d937e2b7c34dd4a2365be455d0b82a;hp=7f01d1eec9322fcddd4eca1bed49b380c066ade1;hpb=37b4005d3e117ac9b65d7a83fa69bd29e8092e63;p=simgear.git diff --git a/simgear/misc/texcoord.cxx b/simgear/misc/texcoord.cxx index 7f01d1ee..2705980d 100644 --- a/simgear/misc/texcoord.cxx +++ b/simgear/misc/texcoord.cxx @@ -14,10 +14,9 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -140,14 +139,18 @@ enter this in the official comments in case I forget again. :-) */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include -// #include STL_IOSTREAM +// #include #include "texcoord.hxx" -// SG_USING_STD(cout); -// SG_USING_STD(endl); +// using std::cout; +// using std::endl; #define FG_STANDARD_TEXTURE_DIMENSION 1000.0 // meters @@ -173,13 +176,19 @@ static inline Point3D basic_tex_coord( const Point3D& p, // calculate "none stretching" texture coordinates point_list sgCalcTexCoords( const SGBucket& b, const point_list& geod_nodes, const int_list& fan, double scale ) +{ + return sgCalcTexCoords(b.get_center_lat(), geod_nodes, fan, scale); +} + +point_list sgCalcTexCoords( double centerLat, const point_list& geod_nodes, + const int_list& fan, double scale ) { // cout << "calculating texture coordinates for a specific fan of size = " // << fan.size() << endl; // calculate perimeter based on center of this degree (not center // of bucket) - double clat = (int)b.get_center_lat(); + double clat = (int)centerLat; if ( clat > 0 ) { clat = (int)clat + 0.5; } else {