com.jme.scene
Class TexCoords

java.lang.Object
  extended by com.jme.scene.TexCoords
All Implemented Interfaces:
Savable

public class TexCoords
extends java.lang.Object
implements Savable

Simple data class storing a buffer of floats and a number that indicates how many floats to group together to make up a texture coordinate "tuple"

Author:
Joshua Slack

Field Summary
 java.nio.FloatBuffer coords
           
 int perVert
           
 
Constructor Summary
TexCoords()
           
TexCoords(java.nio.FloatBuffer coords)
           
TexCoords(java.nio.FloatBuffer coords, int coordsPerVert)
           
 
Method Summary
static TexCoords ensureSize(TexCoords tc, int vertexCount, int perVert)
          Check an incoming TexCoords object for null and correct size.
 java.lang.Class getClassTag()
           
static TexCoords makeNew(float[] coords)
           
static TexCoords makeNew(Vector2f[] coords)
           
static TexCoords makeNew(Vector3f[] coords)
           
 void read(JMEImporter im)
           
 void write(JMEExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coords

public java.nio.FloatBuffer coords

perVert

public int perVert
Constructor Detail

TexCoords

public TexCoords()

TexCoords

public TexCoords(java.nio.FloatBuffer coords)

TexCoords

public TexCoords(java.nio.FloatBuffer coords,
                 int coordsPerVert)
Method Detail

makeNew

public static TexCoords makeNew(Vector2f[] coords)

makeNew

public static TexCoords makeNew(Vector3f[] coords)

makeNew

public static TexCoords makeNew(float[] coords)

ensureSize

public static TexCoords ensureSize(TexCoords tc,
                                   int vertexCount,
                                   int perVert)
Check an incoming TexCoords object for null and correct size.

Parameters:
tc -
vertexCount -
perVert -
Returns:
tc if it is not null and the right size, otherwise it will be a new TexCoords object.

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface Savable

read

public void read(JMEImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

write

public void write(JMEExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException