public class GeometryRaw
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GeometryRaw.GeometryType |
Constructor and Description |
---|
GeometryRaw() |
Modifier and Type | Method and Description |
---|---|
void |
addColors(int[] colors)
Add a group of colors.
|
void |
addNorms(double[] norms)
Add a group of normals at once.
|
void |
addPoints(double[] pts)
Add a group of points at once.
|
void |
addTexCoords(float[] texCoords)
Add a group of texture coordinates.
|
void |
addTriangles(int[] tris)
Add a group of triangles.
|
void |
finalize() |
void |
setTexture(MaplyTexture tex)
Apply a texture to the geometry.
|
void |
setTextureNative(long texID) |
void |
setType(GeometryRaw.GeometryType type)
Set the geometry type.
|
void |
setTypeNative(int type) |
boolean |
valid()
Returns true if the raw geometry object is valid.
|
public boolean valid()
public void setTypeNative(int type)
public void setType(GeometryRaw.GeometryType type)
public void setTexture(MaplyTexture tex)
public void setTextureNative(long texID)
public void addPoints(double[] pts)
pts
- Points are organized as X,Y,Z in order.numPts
- Number of pointspublic void addNorms(double[] norms)
norms
- Norms are organized as X,Y,Z in order.numNorms
- Number of normalspublic void addTexCoords(float[] texCoords)
texCoords
- Texture coordinates are organized as u,v.numTexCoords
- Number of texture coordinates.public void addColors(int[] colors)
colors
- Individual colors as 32 bit values.numColors
- Number of colors.public void addTriangles(int[] tris)
tris
- Triangles are organized as three vertices per triangle.numTris
- Number of triangles.public void finalize()
finalize
in class java.lang.Object