Package com.jme3.animation
Class CompactFloatArray
- All Implemented Interfaces:
Savable
,JmeCloneable
,Cloneable
Serialize and compress Float by indexing similar values
-
Field Summary
Fields inherited from class com.jme3.animation.CompactArray
array, index, indexPool
-
Constructor Summary
ConstructorDescriptionCreates a compact vector arrayCompactFloatArray
(float[] dataArray, int[] index) creates a compact vector array -
Method Summary
Modifier and TypeMethodDescriptionprotected Float
deserialize
(int i, Float store) deserialize objectvoid
fill
(int startIndex, float[] store) protected final int
serialized size of one object elementvoid
read
(JmeImporter im) protected void
serialize objectvoid
write
(JmeExporter ex) Methods inherited from class com.jme3.animation.CompactArray
add, clone, cloneFields, ensureCapacity, freeze, get, getCompactIndex, getCompactObjectSize, getIndex, getSerializedData, getSerializedSize, getTotalObjectSize, jmeClone, serialize, set, setInvalid, toObjectArray
-
Constructor Details
-
CompactFloatArray
public CompactFloatArray()Creates a compact vector array -
CompactFloatArray
public CompactFloatArray(float[] dataArray, int[] index) creates a compact vector array- Parameters:
dataArray
- the data arrayindex
- the indices
-
-
Method Details
-
getTupleSize
protected final int getTupleSize()Description copied from class:CompactArray
serialized size of one object element- Specified by:
getTupleSize
in classCompactArray<Float>
- Returns:
- the number of primitive components (floats) per object
-
getElementClass
- Specified by:
getElementClass
in classCompactArray<Float>
-
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
IOException
-
fill
public void fill(int startIndex, float[] store) -
serialize
Description copied from class:CompactArray
serialize object- Specified by:
serialize
in classCompactArray<Float>
- Parameters:
i
- compacted object indexdata
- the value to be serialized (not null, unaffected)
-
deserialize
Description copied from class:CompactArray
deserialize object- Specified by:
deserialize
in classCompactArray<Float>
- Parameters:
i
- compacted object indexstore
- storage for the result- Returns:
- the deserialized value
-