com.jme3.animation
Class CompactVector3Array

java.lang.Object
  extended by com.jme3.animation.CompactArray<Vector3f>
      extended by com.jme3.animation.CompactVector3Array
All Implemented Interfaces:
Savable

public class CompactVector3Array
extends CompactArray<Vector3f>
implements Savable

Serialize and compress Vector3f[] by indexing same values


Field Summary
 
Fields inherited from class com.jme3.animation.CompactArray
array, index
 
Constructor Summary
CompactVector3Array()
          Creates a compact vector array
CompactVector3Array(float[] dataArray, int[] index)
          creates a compact vector array
 
Method Summary
protected  Vector3f deserialize(int i, Vector3f store)
          deserialize object
protected  java.lang.Class<Vector3f> getElementClass()
           
protected  int getTupleSize()
          serialized size of one object element
 void read(JmeImporter im)
           
protected  void serialize(int i, Vector3f store)
          serialize object
 void write(JmeExporter ex)
           
 
Methods inherited from class com.jme3.animation.CompactArray
add, ensureCapacity, freeze, get, getCompactIndex, getCompactObjectSize, getIndex, getSerializedData, getSerializedSize, getTotalObjectSize, serialize, set, toObjectArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompactVector3Array

public CompactVector3Array()
Creates a compact vector array


CompactVector3Array

public CompactVector3Array(float[] dataArray,
                           int[] index)
creates a compact vector array

Parameters:
dataArray - the data array
index - the indices
Method Detail

getTupleSize

protected final int getTupleSize()
Description copied from class: CompactArray
serialized size of one object element

Specified by:
getTupleSize in class CompactArray<Vector3f>

getElementClass

protected final java.lang.Class<Vector3f> getElementClass()
Specified by:
getElementClass in class CompactArray<Vector3f>

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

serialize

protected void serialize(int i,
                         Vector3f store)
Description copied from class: CompactArray
serialize object

Specified by:
serialize in class CompactArray<Vector3f>
Parameters:
i - compacted object index

deserialize

protected Vector3f deserialize(int i,
                               Vector3f store)
Description copied from class: CompactArray
deserialize object

Specified by:
deserialize in class CompactArray<Vector3f>
Parameters:
i - compacted object index