Give calc_tex_coords() a more conformant name: sgCalcTexCoords()
This commit is contained in:
@@ -140,8 +140,15 @@ enter this in the official comments in case I forget again. :-)
|
||||
|
||||
*/
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
// #include STL_IOSTREAM
|
||||
|
||||
#include "texcoord.hxx"
|
||||
|
||||
// SG_USING_STD(cout);
|
||||
// SG_USING_STD(endl);
|
||||
|
||||
|
||||
#define FG_STANDARD_TEXTURE_DIMENSION 1000.0 // meters
|
||||
#define MAX_TEX_COORD 8.0
|
||||
@@ -149,9 +156,10 @@ enter this in the official comments in case I forget again. :-)
|
||||
|
||||
|
||||
// return the basic unshifted/unmoded texture coordinate for a lat/lon
|
||||
inline Point3D basic_tex_coord( const Point3D& p,
|
||||
double degree_width, double degree_height,
|
||||
double scale )
|
||||
static inline Point3D basic_tex_coord( const Point3D& p,
|
||||
double degree_width,
|
||||
double degree_height,
|
||||
double scale )
|
||||
{
|
||||
return Point3D( p.x() * ( degree_width * scale /
|
||||
FG_STANDARD_TEXTURE_DIMENSION ),
|
||||
@@ -163,7 +171,7 @@ inline Point3D basic_tex_coord( const Point3D& p,
|
||||
|
||||
// traverse the specified fan/strip/list of vertices and attempt to
|
||||
// calculate "none stretching" texture coordinates
|
||||
point_list calc_tex_coords( const SGBucket& b, const point_list& geod_nodes,
|
||||
point_list sgCalcTexCoords( const SGBucket& b, const point_list& geod_nodes,
|
||||
const int_list& fan, double scale )
|
||||
{
|
||||
// cout << "calculating texture coordinates for a specific fan of size = "
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
* @param scale (default = 1.0) scaling factor
|
||||
* @return list of texture coordinates
|
||||
*/
|
||||
point_list calc_tex_coords( const SGBucket& b, const point_list& geod_nodes,
|
||||
point_list sgCalcTexCoords( const SGBucket& b, const point_list& geod_nodes,
|
||||
const int_list& fan, double scale = 1.0 );
|
||||
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ bool sgGenTile( const string& path, SGBucket b,
|
||||
geod_nodes.push_back( geod[i] );
|
||||
rectangle.push_back( i );
|
||||
}
|
||||
point_list texs = calc_tex_coords( b, geod_nodes, rectangle,
|
||||
point_list texs = sgCalcTexCoords( b, geod_nodes, rectangle,
|
||||
1000.0 / tex_width );
|
||||
|
||||
// Allocate ssg structure
|
||||
|
||||
Reference in New Issue
Block a user