]> git.mxchange.org Git - simgear.git/blob - simgear/misc/texcoord.hxx
Better error reporting for effects
[simgear.git] / simgear / misc / texcoord.hxx
1 /**
2  * \file texcoord.hxx
3  * Routine to handle texture coordinate generation.
4  */
5
6 // Written by Curtis Olson, started March 1999.
7 //
8 // Copyright (C) 1999  Curtis L. Olson  - http://www.flightgear.org/~curt
9 //
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.
14 //
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.
19 //
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.
23 //
24 // $Id$
25
26
27 #ifndef _TEXCOORD_HXX
28 #define _TEXCOORD_HXX
29
30
31 #ifndef __cplusplus
32 # error This library requires C++
33 #endif
34
35
36 #include <simgear/bucket/newbucket.hxx>
37 #include <simgear/math/sg_types.hxx>
38
39
40 /**
41  * Traverse the specified fan/strip/list of vertices and attempt to
42  * calculate "none stretching" texture coordinates.
43  * @param b the bucket containing the structure
44  * @param geod_nodes vertices in geodetic coordinates
45  * @param fan integer list of indices pointing into the vertex list
46  * @param scale (default = 1.0) scaling factor
47  * @return list of texture coordinates
48  */
49 point_list sgCalcTexCoords( const SGBucket& b, const point_list& geod_nodes,
50                             const int_list& fan, double scale = 1.0 );
51
52 point_list sgCalcTexCoords( double centerLat, const point_list& geod_nodes,
53                             const int_list& fan, double scale = 1.0 );
54
55
56 #endif // _TEXCOORD_HXX