]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/texcoord.cxx
Move SGReadFileCallback from model.cxx to public class ModelRegistry
[simgear.git] / simgear / misc / texcoord.cxx
index 885728e9df8bb2ec539c0c9bfd62c32c0eeecadc..ea56ea9396879e85692b8ff04b1d96b8146348ee 100644 (file)
@@ -176,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 {