use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class Vector3d method read.
public void read(JmeImporter e) throws IOException {
InputCapsule capsule = e.getCapsule(this);
x = capsule.readDouble("x", 0);
y = capsule.readDouble("y", 0);
z = capsule.readDouble("z", 0);
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class EmitterMeshVertexShape method read.
@Override
@SuppressWarnings("unchecked")
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
this.vertices = ic.readSavableArrayList("vertices", null);
List<List<Vector3f>> tmpNormals = ic.readSavableArrayList("normals", null);
if (tmpNormals != null) {
this.normals = tmpNormals;
}
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class BIHTree method read.
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
mesh = (Mesh) ic.readSavable("mesh", null);
root = (BIHNode) ic.readSavable("root", null);
maxTrisPerNode = ic.readInt("tris_per_node", 0);
pointData = ic.readFloatArray("points", null);
triIndices = ic.readIntArray("indices", null);
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class DefaultParticleInfluencer method read.
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
// NOTE: In previous versions of jME3, initialVelocity was called startVelocity
if (ic.getSavableVersion(DefaultParticleInfluencer.class) == 0) {
initialVelocity = (Vector3f) ic.readSavable("startVelocity", Vector3f.ZERO.clone());
} else {
initialVelocity = (Vector3f) ic.readSavable("initialVelocity", Vector3f.ZERO.clone());
}
velocityVariation = ic.readFloat("variation", 0.2f);
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class NewtonianParticleInfluencer method read.
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule ic = im.getCapsule(this);
normalVelocity = ic.readFloat("normalVelocity", 0.0f);
surfaceTangentFactor = ic.readFloat("surfaceTangentFactor", 0.0f);
surfaceTangentRotation = ic.readFloat("surfaceTangentRotation", 0.0f);
}
Aggregations