com.threerings.opengl.renderer
Class ClientArray

java.lang.Object
  extended by com.threerings.opengl.renderer.ClientArray

public class ClientArray
extends Object

Represents the state of a single client array.


Field Summary
 BufferObject arrayBuffer
          The buffer object, if using one.
 boolean dirty
          Set when the array parameters have changed and must be reapplied.
 FloatBuffer floatArray
          The float array, if using one.
 boolean normalized
          Whether or not to normalize the components.
 long offset
          The offset into the buffer.
 int size
          The number of components in each element.
 int stride
          The stride between adjacent elements.
 int type
          The type of the components.
 
Constructor Summary
ClientArray()
          Creates an uninitialized array.
ClientArray(int size, FloatBuffer floatArray)
          Creates a simple array that draws from a float buffer.
ClientArray(int size, int type, boolean normalized, int stride, long offset, BufferObject arrayBuffer, FloatBuffer floatArray)
          Creates an array.
ClientArray(int size, int type, BufferObject arrayBuffer)
          Creates a simple array that draws from a buffer object.
ClientArray(int size, int type, int stride, long offset, BufferObject arrayBuffer)
          Creates an array that draws from part of a buffer object.
ClientArray(int size, int stride, long offset, FloatBuffer floatArray)
          Creates an array that draws from part of a float buffer.
 
Method Summary
 boolean equals(Object other)
           
 int getComponentBytes()
          Returns the number of bytes in each component.
 int getElementBytes()
          Returns the number of bytes in each element.
 ClientArray set(ClientArray array)
          Copies the values in the supplied object into this one.
 ClientArray set(int size, int type, boolean normalized, int stride, long offset, BufferObject arrayBuffer, FloatBuffer floatArray)
          Sets all fields at once.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

public int size
The number of components in each element.


type

public int type
The type of the components.


normalized

public boolean normalized
Whether or not to normalize the components.


stride

public int stride
The stride between adjacent elements.


offset

public long offset
The offset into the buffer.


arrayBuffer

public BufferObject arrayBuffer
The buffer object, if using one.


floatArray

public FloatBuffer floatArray
The float array, if using one.


dirty

public boolean dirty
Set when the array parameters have changed and must be reapplied.

Constructor Detail

ClientArray

public ClientArray(int size,
                   int type,
                   BufferObject arrayBuffer)
Creates a simple array that draws from a buffer object.


ClientArray

public ClientArray(int size,
                   int type,
                   int stride,
                   long offset,
                   BufferObject arrayBuffer)
Creates an array that draws from part of a buffer object.


ClientArray

public ClientArray(int size,
                   FloatBuffer floatArray)
Creates a simple array that draws from a float buffer.


ClientArray

public ClientArray(int size,
                   int stride,
                   long offset,
                   FloatBuffer floatArray)
Creates an array that draws from part of a float buffer.


ClientArray

public ClientArray(int size,
                   int type,
                   boolean normalized,
                   int stride,
                   long offset,
                   BufferObject arrayBuffer,
                   FloatBuffer floatArray)
Creates an array.


ClientArray

public ClientArray()
Creates an uninitialized array.

Method Detail

set

public ClientArray set(ClientArray array)
Copies the values in the supplied object into this one.

Returns:
a reference to this array, for chaining.

set

public ClientArray set(int size,
                       int type,
                       boolean normalized,
                       int stride,
                       long offset,
                       BufferObject arrayBuffer,
                       FloatBuffer floatArray)
Sets all fields at once.

Returns:
a reference to the array, for chaining.

getElementBytes

public int getElementBytes()
Returns the number of bytes in each element.


getComponentBytes

public int getComponentBytes()
Returns the number of bytes in each component.


equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.