Package com.jme3.animation
Class CompactVector3Array
- All Implemented Interfaces:
Savable,JmeCloneable,Cloneable
Serialize and compress Vector3f[] by indexing same values
-
Field Summary
Fields inherited from class com.jme3.animation.CompactArray
array, index, indexPool -
Constructor Summary
ConstructorsConstructorDescriptionCreates a compact vector arrayCompactVector3Array(float[] dataArray, int[] index) creates a compact vector array -
Method Summary
Modifier and TypeMethodDescriptionprotected Vector3fdeserialize(int i, Vector3f store) deserialize objectprotected final intserialized size of one object elementvoidread(JmeImporter im) protected voidserialize objectvoidwrite(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
-
CompactVector3Array
public CompactVector3Array()Creates a compact vector array -
CompactVector3Array
public CompactVector3Array(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:CompactArrayserialized size of one object element- Specified by:
getTupleSizein classCompactArray<Vector3f>- Returns:
- the number of primitive components (floats) per object
-
getElementClass
- Specified by:
getElementClassin classCompactArray<Vector3f>
-
write
- Specified by:
writein interfaceSavable- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Throws:
IOException
-
serialize
Description copied from class:CompactArrayserialize object- Specified by:
serializein classCompactArray<Vector3f>- Parameters:
i- compacted object indexstore- the value to be serialized (not null, unaffected)
-
deserialize
Description copied from class:CompactArraydeserialize object- Specified by:
deserializein classCompactArray<Vector3f>- Parameters:
i- compacted object indexstore- storage for the result- Returns:
- the deserialized value
-