HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_TextureUtils.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU_TextureUtils.h ( GU Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GU_TextureUtils__
12 #define __GU_TextureUtils__
13 
14 #include "GU_API.h"
15 
16 #include <SYS/SYS_Types.h>
17 class GU_Detail;
18 class GA_PrimitiveGroup;
19 
20 /// GUfixVertexTextureSeams() will look for "seams" uv's and try to fix them.
21 ///
22 /// Seams in textures occur when the texture coordinates "wrap" in periodicity.
23 /// For example, when doing polar mapping, at one meridian, the u-coordinates
24 /// will go from 0.9 to 0.1. So, in this case, rather than mapping from 0.9 to
25 /// 0.1, the texture engine will interpolate between .1 and .9 and the entire
26 /// map will appear (reversed) in that span. This code simply looks for faces
27 /// which have a delta in coordinates larger than the uv_span passed in and
28 /// will then attempt to fix this by adjusting coordinates. In the above case,
29 /// the coordinates would be set to either (-0.1, 0.1) or (0.9, 1.1).
30 ///
31 /// This is only applicable to vertex texture coordinates since point textures
32 /// are shared between primitives and fixing for one primitive would likely
33 /// break another primitive (which shared points).
35  fpreal uv_span = 0.25,
36  const char *attrib="uv",
37  const GA_PrimitiveGroup *group = NULL);
38 
39 #endif
40 
#define GU_API
Definition: GU_API.h:11
GU_API bool GUfixVertexTextureSeams(GU_Detail &gdp, fpreal uv_span=0.25, const char *attrib="uv", const GA_PrimitiveGroup *group=NULL)
double fpreal
Definition: SYS_Types.h:269