3 * Routine to handle texture coordinate generation.
6 // Written by Curtis Olson, started March 1999.
8 // Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Library General Public
12 // License as published by the Free Software Foundation; either
13 // version 2 of the License, or (at your option) any later version.
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Library General Public License for more details.
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32 # error This library requires C++
36 #include <simgear/bucket/newbucket.hxx>
37 #include <simgear/math/sg_types.hxx>
39 #include <simgear/math/SGMathFwd.hxx>
40 #include <simgear/math/SGGeod.hxx>
41 #include <simgear/math/SGVec2.hxx>
44 * Traverse the specified fan/strip/list of vertices and attempt to
45 * calculate "none stretching" texture coordinates.
46 * @param b the bucket containing the structure
47 * @param geod_nodes vertices in geodetic coordinates
48 * @param fan integer list of indices pointing into the vertex list
49 * @param scale (default = 1.0) scaling factor
50 * @return list of texture coordinates
52 std::vector<SGVec2f> sgCalcTexCoords( const SGBucket& b, const std::vector<SGGeod>& geod_nodes,
53 const int_list& fan, double scale = 1.0 );
55 std::vector<SGVec2f> sgCalcTexCoords( double centerLat, const std::vector<SGGeod>& geod_nodes,
56 const int_list& fan, double scale = 1.0 );
59 #endif // _TEXCOORD_HXX