]> git.mxchange.org Git - simgear.git/blob - simgear/misc/texcoord.hxx
Give calc_tex_coords() a more conformant name: sgCalcTexCoords()
[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  - curt@flightgear.org
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 Library General Public
21 // License along with this library; if not, write to the
22 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 // Boston, MA  02111-1307, USA.
24 //
25 // $Id$
26
27
28 #ifndef _TEXCOORD_HXX
29 #define _TEXCOORD_HXX
30
31
32 #ifndef __cplusplus                                                          
33 # error This library requires C++
34 #endif                                   
35
36
37 #include <simgear/bucket/newbucket.hxx>
38 #include <simgear/math/sg_types.hxx>
39
40
41 /**
42  * Traverse the specified fan/strip/list of vertices and attempt to
43  * calculate "none stretching" texture coordinates.
44  * @param b the bucket containing the structure
45  * @param geod_nodes vertices in geodetic coordinates
46  * @param fan integer list of indices pointing into the vertex list
47  * @param scale (default = 1.0) scaling factor
48  * @return list of texture coordinates
49  */
50 point_list sgCalcTexCoords( const SGBucket& b, const point_list& geod_nodes,
51                             const int_list& fan, double scale = 1.0 );
52
53
54 #endif // _TEXCOORD_HXX