com.jme3.animation
クラス CompactArray<T>

java.lang.Object
  上位を拡張 com.jme3.animation.CompactArray<T>
型パラメータ:
T -
直系の既知のサブクラス:
CompactQuaternionArray, CompactVector3Array

public abstract class CompactArray<T>
extends java.lang.Object

Object is indexed and stored in primitive float[]


コンストラクタの概要
CompactArray()
          Creates a compact array
CompactArray(float[] compressedArray, int[] index)
          create array using serialized data
 
メソッドの概要
 void add(T... objArray)
          Add objects.
 void freeze()
          release objects.
 T get(int index, T store)
          returns the object for the given index
 int getCompactIndex(int objIndex)
          returns the corresponding index in the compact array
 int getCompactObjectSize()
           
 int[] getIndex(T... objArray)
          retrun an array of indices for the given objects
 float[] getSerializedData()
          return a float array of serialized data
 int getTotalObjectSize()
           
 void serialize()
          serialize this compact array
 void set(int index, T value)
           
 T[] toObjectArray()
          decompress and return object array
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CompactArray

public CompactArray()
Creates a compact array


CompactArray

public CompactArray(float[] compressedArray,
                    int[] index)
create array using serialized data

パラメータ:
compressedArray -
index -
メソッドの詳細

add

public void add(T... objArray)
Add objects. They are serialized automatically when get() method is called.

パラメータ:
objArray -

freeze

public void freeze()
release objects. add() method call is not allowed anymore.


set

public final void set(int index,
                      T value)
パラメータ:
index -
value -

get

public final T get(int index,
                   T store)
returns the object for the given index

パラメータ:
index - the index
store - an object to store the result
戻り値:

getSerializedData

public final float[] getSerializedData()
return a float array of serialized data

戻り値:

serialize

public final void serialize()
serialize this compact array


getIndex

public final int[] getIndex(T... objArray)
retrun an array of indices for the given objects

パラメータ:
objArray -
戻り値:

getCompactIndex

public int getCompactIndex(int objIndex)
returns the corresponding index in the compact array

パラメータ:
objIndex -
戻り値:
object index in the compacted object array

getTotalObjectSize

public final int getTotalObjectSize()
戻り値:
uncompressed object size

getCompactObjectSize

public final int getCompactObjectSize()
戻り値:
compressed object size

toObjectArray

public final T[] toObjectArray()
decompress and return object array

戻り値:
decompress and return object array