org.osm2world.core.world.modules.common
Class WorldModuleTexturingUtil

Object
  extended by WorldModuleTexturingUtil

public class WorldModuleTexturingUtil
extends Object

utility class that can be used by WorldModules to generate texture coordinates


Method Summary
static List<List<VectorXZ>> globalTexCoordLists(Collection<TriangleXYZ> triangles, Material material, boolean vertical)
          variant of globalTexCoordLists(List, Material, boolean) based on a triangle collection
static List<List<VectorXZ>> globalTexCoordLists(List<VectorXYZ> vs, Material material, boolean vertical)
          creates texture coordinates based only on the vertex coordinates in the global coordinate system and the texture size
static List<List<VectorXZ>> slopedFaceTexCoordLists(Collection<TriangleXYZ> triangles, Material material)
          creates texture coordinates for triangles that orient the texture based on each triangle's downward slope.
static List<List<VectorXZ>> wallTexCoordLists(List<VectorXYZ> vs, Material material)
          creates texture coordinates for a triangle strip, based on the length along a wall from the starting point, height of the vertex, and texture size.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

globalTexCoordLists

public static final List<List<VectorXZ>> globalTexCoordLists(List<VectorXYZ> vs,
                                                             Material material,
                                                             boolean vertical)
creates texture coordinates based only on the vertex coordinates in the global coordinate system and the texture size

Parameters:
vertical - uses x,y coordinates instead of x,z coordinates

globalTexCoordLists

public static final List<List<VectorXZ>> globalTexCoordLists(Collection<TriangleXYZ> triangles,
                                                             Material material,
                                                             boolean vertical)
variant of globalTexCoordLists(List, Material, boolean) based on a triangle collection

Parameters:
vertical - TODO

slopedFaceTexCoordLists

public static final List<List<VectorXZ>> slopedFaceTexCoordLists(Collection<TriangleXYZ> triangles,
                                                                 Material material)
creates texture coordinates for triangles that orient the texture based on each triangle's downward slope.


wallTexCoordLists

public static final List<List<VectorXZ>> wallTexCoordLists(List<VectorXYZ> vs,
                                                           Material material)
creates texture coordinates for a triangle strip, based on the length along a wall from the starting point, height of the vertex, and texture size.

Parameters:
vs - wall vertices, ordered along the wall, for a triangle strip alternating between upper and lower vertex