|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.geometry.Geometry
com.threerings.opengl.geometry.DynamicGeometry
public abstract class DynamicGeometry
Base class for dynamic geometry.
| Field Summary | |
|---|---|
protected BufferObject |
_arrayBuffer
The VBO, if we're using one. |
protected float[] |
_data
The vertex data. |
protected FloatBuffer |
_floatArray
The float array. |
protected static FloatBuffer |
_scratchBuffer
The shared scratch buffer used to hold vertex data before copying to the VBO. |
| Fields inherited from class com.threerings.opengl.geometry.Geometry |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
protected |
DynamicGeometry()
Constructor for subclasses. |
|
DynamicGeometry(float[] data,
BufferObject arrayBuffer)
Creates a new dynamic geometry that will draw from a VBO. |
|
DynamicGeometry(float[] data,
BufferObject arrayBuffer,
FloatBuffer floatArray)
Creates a new dynamic geometry. |
|
DynamicGeometry(float[] data,
FloatBuffer floatArray)
Creates a new dynamic geometry that will draw directly from a float buffer. |
| Method Summary | |
|---|---|
protected static FloatBuffer |
getScratchBuffer(int size)
Returns a reference to the scratch buffer, (re)creating it if necessary to provide the supplied size. |
boolean |
requiresUpdate()
Checks whether this geometry requires a call to its Geometry.update() method before rendering. |
void |
update()
Updates the state of the geometry. |
protected abstract void |
updateData()
Updates the vertex data. |
| Methods inherited from class com.threerings.opengl.geometry.Geometry |
|---|
getArrayState, getBoneMatrices, getCenter, getCoordSpace, getDrawCommand |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float[] _data
protected BufferObject _arrayBuffer
protected FloatBuffer _floatArray
protected static FloatBuffer _scratchBuffer
| Constructor Detail |
|---|
public DynamicGeometry(float[] data,
BufferObject arrayBuffer)
data - the array from which vertex data will be copied at each update.arrayBuffer - the VBO into which the vertex data will be copied.
public DynamicGeometry(float[] data,
FloatBuffer floatArray)
data - the array from which vertex data will be copied at each update.floatArray - the buffer into which vertex data will be copied.
public DynamicGeometry(float[] data,
BufferObject arrayBuffer,
FloatBuffer floatArray)
data - the array from which vertex data will be copied at each update.arrayBuffer - the VBO into which the vertex data will be copied, or null
for none.floatArray - the buffer into which vertex data will be copied, or null
if using a VBO.protected DynamicGeometry()
| Method Detail |
|---|
public boolean requiresUpdate()
GeometryGeometry.update() method before rendering.
requiresUpdate in class Geometrypublic void update()
Geometry
update in class Geometryprotected abstract void updateData()
protected static FloatBuffer getScratchBuffer(int size)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||