com.threerings.opengl.geometry
Class DynamicGeometry

java.lang.Object
  extended by com.threerings.opengl.geometry.Geometry
      extended by com.threerings.opengl.geometry.DynamicGeometry
Direct Known Subclasses:
ParticleGeometry

public abstract class DynamicGeometry
extends Geometry

Base class for dynamic geometry.


Field Summary
 
Fields inherited from class com.threerings.opengl.geometry.Geometry
EMPTY
 
Constructor Summary
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
 boolean requiresUpdate()
          Checks whether this geometry requires a call to its Geometry.update() method before rendering.
 void update()
          Updates the state of the geometry.
 
Methods inherited from class com.threerings.opengl.geometry.Geometry
getArrayState, getBoneMatrices, getCenter, getCoordSpace, getDrawCommand
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicGeometry

public DynamicGeometry(float[] data,
                       BufferObject arrayBuffer)
Creates a new dynamic geometry that will draw from a VBO.

Parameters:
data - the array from which vertex data will be copied at each update.
arrayBuffer - the VBO into which the vertex data will be copied.

DynamicGeometry

public DynamicGeometry(float[] data,
                       FloatBuffer floatArray)
Creates a new dynamic geometry that will draw directly from a float buffer.

Parameters:
data - the array from which vertex data will be copied at each update.
floatArray - the buffer into which vertex data will be copied.

DynamicGeometry

public DynamicGeometry(float[] data,
                       BufferObject arrayBuffer,
                       FloatBuffer floatArray)
Creates a new dynamic geometry.

Parameters:
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.
Method Detail

requiresUpdate

public boolean requiresUpdate()
Description copied from class: Geometry
Checks whether this geometry requires a call to its Geometry.update() method before rendering.

Overrides:
requiresUpdate in class Geometry

update

public void update()
Description copied from class: Geometry
Updates the state of the geometry.

Overrides:
update in class Geometry


Copyright © 2011. All Rights Reserved.