Add curvature to ocean tiles.
An apron around the tile hides cracks with coastal tiles. The VectorArrayAdapter, which lives in the simgear namespace, is a useful utility class for treating vectors as 2D arrays.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -49,5 +49,8 @@
|
||||
point_list sgCalcTexCoords( const SGBucket& b, const point_list& geod_nodes,
|
||||
const int_list& fan, double scale = 1.0 );
|
||||
|
||||
point_list sgCalcTexCoords( double centerLat, const point_list& geod_nodes,
|
||||
const int_list& fan, double scale = 1.0 );
|
||||
|
||||
|
||||
#endif // _TEXCOORD_HXX
|
||||
|
||||
Reference in New Issue
Block a user