com.threerings.opengl.geometry.util
Class GeometryUtil

java.lang.Object
  extended by com.threerings.opengl.geometry.util.GeometryUtil

public class GeometryUtil
extends Object

Various static methods relating to geometry processing.


Constructor Summary
GeometryUtil()
           
 
Method Summary
static ArrayState[] createArrayStates(HashMap<String,ClientArray> vertexAttribArrays, HashIntMap<ClientArray> texCoordArrays, ClientArray colorArray, ClientArray normalArray, ClientArray vertexArray, BufferObject elementArrayBuffer, PassDescriptor[] passes)
          Creates a set of array states for the specified passes.
static ArrayList<ClientArray> createList(HashMap<String,ClientArray> vertexAttribArrays, HashIntMap<ClientArray> texCoordArrays, ClientArray colorArray, ClientArray normalArray, ClientArray vertexArray)
          Creates a list containing all of the supplied arrays for ease of processing.
static int updateOffsetsAndStride(ArrayList<ClientArray> arrays)
          Computes the offsets and stride of the specified interleaved arrays.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryUtil

public GeometryUtil()
Method Detail

createList

public static ArrayList<ClientArray> createList(HashMap<String,ClientArray> vertexAttribArrays,
                                                HashIntMap<ClientArray> texCoordArrays,
                                                ClientArray colorArray,
                                                ClientArray normalArray,
                                                ClientArray vertexArray)
Creates a list containing all of the supplied arrays for ease of processing.


updateOffsetsAndStride

public static int updateOffsetsAndStride(ArrayList<ClientArray> arrays)
Computes the offsets and stride of the specified interleaved arrays.

Returns:
the stride between vertices, in bytes.

createArrayStates

public static ArrayState[] createArrayStates(HashMap<String,ClientArray> vertexAttribArrays,
                                             HashIntMap<ClientArray> texCoordArrays,
                                             ClientArray colorArray,
                                             ClientArray normalArray,
                                             ClientArray vertexArray,
                                             BufferObject elementArrayBuffer,
                                             PassDescriptor[] passes)
Creates a set of array states for the specified passes.

Parameters:
vertexAttribArrays - maps vertex attribute names to client arrays.
texCoordArrays - maps texture coordinate sets to client arrays.
colorArray - the color client array, if any.
normalArray - the normal client array, if any.
vertexArray - the vertex client array (required).
elementArrayBuffer - the element array buffer, if any.


Copyright © 2011. All Rights Reserved.