public class Geometry3D
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Geometry3D.BufferType |
Modifier and Type | Field and Description |
---|---|
static int |
FLOAT_SIZE_BYTES |
static int |
INT_SIZE_BYTES |
static int |
SHORT_SIZE_BYTES |
Constructor and Description |
---|
Geometry3D() |
Geometry3D(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
areOnlyShortBuffersSupported() |
void |
changeBufferData(BufferInfo bufferInfo,
java.nio.Buffer newData,
int index) |
void |
changeBufferUsage(BufferInfo bufferInfo,
int usage)
Specifies the expected usage pattern of the data store.
|
void |
copyFromGeometry3D(Geometry3D geom) |
void |
createBuffer(BufferInfo bufferInfo,
Geometry3D.BufferType type,
java.nio.Buffer buffer,
int target) |
void |
createBuffer(BufferInfo bufferInfo,
Geometry3D.BufferType type,
java.nio.Buffer buffer,
int target,
int usage) |
void |
createBuffers() |
void |
createVertexAndNormalBuffersOnly() |
BoundingBox |
getBoundingBox() |
BoundingSphere |
getBoundingSphere() |
BufferInfo |
getColorBufferInfo() |
java.nio.FloatBuffer |
getColors() |
BufferInfo |
getIndexBufferInfo() |
java.nio.Buffer |
getIndices() |
java.lang.String |
getName() |
BufferInfo |
getNormalBufferInfo() |
java.nio.FloatBuffer |
getNormals() |
int |
getNumIndices() |
int |
getNumVertices() |
BufferInfo |
getTexCoordBufferInfo() |
java.nio.FloatBuffer |
getTextureCoords() |
BufferInfo |
getVertexBufferInfo() |
java.nio.FloatBuffer |
getVertices() |
boolean |
hasBoundingBox() |
boolean |
hasBoundingSphere() |
boolean |
isValid() |
void |
reload() |
void |
setColor(float r,
float g,
float b,
float a) |
void |
setColor(float r,
float g,
float b,
float a,
boolean createNewBuffer) |
void |
setColorBufferInfo(BufferInfo colorBufferInfo) |
void |
setColors(float[] colors) |
void |
setColors(int color) |
void |
setData(BufferInfo vertexBufferInfo,
BufferInfo normalBufferInfo,
float[] textureCoords,
float[] colors,
int[] indices) |
void |
setData(float[] vertices,
float[] normals,
float[] textureCoords,
float[] colors,
int[] indices) |
void |
setData(float[] vertices,
int verticesUsage,
float[] normals,
int normalsUsage,
float[] textureCoords,
int textureCoordsUsage,
float[] colors,
int colorsUsage,
int[] indices,
int indicesUsage) |
void |
setIndexBufferInfo(BufferInfo indexBufferInfo) |
void |
setIndices(int[] indices) |
void |
setName(java.lang.String name) |
void |
setNormalBufferInfo(BufferInfo normalBufferInfo) |
void |
setNormals(float[] normals) |
void |
setNormals(java.nio.FloatBuffer normals) |
void |
setTexCoordBufferInfo(BufferInfo texCoordBufferInfo) |
void |
setTextureCoords(float[] textureCoords) |
void |
setVertexBufferInfo(BufferInfo vertexBufferInfo) |
void |
setVertices(float[] vertices) |
void |
setVertices(float[] vertices,
boolean override) |
void |
setVertices(java.nio.FloatBuffer vertices) |
java.lang.String |
toString() |
public static final int FLOAT_SIZE_BYTES
public static final int INT_SIZE_BYTES
public static final int SHORT_SIZE_BYTES
public Geometry3D()
public Geometry3D(java.lang.String name)
public void copyFromGeometry3D(Geometry3D geom)
public void setData(BufferInfo vertexBufferInfo, BufferInfo normalBufferInfo, float[] textureCoords, float[] colors, int[] indices)
public void setData(float[] vertices, float[] normals, float[] textureCoords, float[] colors, int[] indices)
public void setData(float[] vertices, int verticesUsage, float[] normals, int normalsUsage, float[] textureCoords, int textureCoordsUsage, float[] colors, int colorsUsage, int[] indices, int indicesUsage)
public void createBuffers()
public void reload()
public boolean isValid()
public void createVertexAndNormalBuffersOnly()
public void createBuffer(BufferInfo bufferInfo, Geometry3D.BufferType type, java.nio.Buffer buffer, int target)
public void createBuffer(BufferInfo bufferInfo, Geometry3D.BufferType type, java.nio.Buffer buffer, int target, int usage)
public void changeBufferUsage(BufferInfo bufferInfo, int usage)
STREAM The data store contents will be modified once and used at most a few times.
STATIC The data store contents will be modified once and used many times.
DYNAMIC The data store contents will be modified repeatedly and used many times.
The nature of access may be one of these:
DRAW The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
READ The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
COPY The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
bufferHandle
- usage
- public void changeBufferData(BufferInfo bufferInfo, java.nio.Buffer newData, int index)
public void setVertices(float[] vertices)
public void setVertices(float[] vertices, boolean override)
public void setVertices(java.nio.FloatBuffer vertices)
public java.nio.FloatBuffer getVertices()
public void setNormals(float[] normals)
public void setNormals(java.nio.FloatBuffer normals)
public java.nio.FloatBuffer getNormals()
public void setIndices(int[] indices)
public java.nio.Buffer getIndices()
public void setTextureCoords(float[] textureCoords)
public java.nio.FloatBuffer getTextureCoords()
public void setColors(int color)
public void setColors(float[] colors)
public java.nio.FloatBuffer getColors()
public int getNumIndices()
public int getNumVertices()
public java.lang.String getName()
public void setName(java.lang.String name)
public void setColor(float r, float g, float b, float a)
public void setColor(float r, float g, float b, float a, boolean createNewBuffer)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasBoundingBox()
public BoundingBox getBoundingBox()
public boolean hasBoundingSphere()
public BoundingSphere getBoundingSphere()
public BufferInfo getVertexBufferInfo()
public void setVertexBufferInfo(BufferInfo vertexBufferInfo)
public BufferInfo getIndexBufferInfo()
public void setIndexBufferInfo(BufferInfo indexBufferInfo)
public BufferInfo getTexCoordBufferInfo()
public void setTexCoordBufferInfo(BufferInfo texCoordBufferInfo)
public BufferInfo getColorBufferInfo()
public void setColorBufferInfo(BufferInfo colorBufferInfo)
public BufferInfo getNormalBufferInfo()
public void setNormalBufferInfo(BufferInfo normalBufferInfo)
public boolean areOnlyShortBuffersSupported()