use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class SphereCollisionShape method read.
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule capsule = im.getCapsule(this);
radius = capsule.readFloat("radius", 0.5f);
createShape();
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class Point2PointJoint method read.
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
createJoint();
InputCapsule cap = im.getCapsule(this);
setDamping(cap.readFloat("damping", 1.0f));
setDamping(cap.readFloat("tau", 0.3f));
setDamping(cap.readFloat("impulseClamp", 0f));
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class PhysicsGhostObject method read.
@Override
public void read(JmeImporter e) throws IOException {
super.read(e);
InputCapsule capsule = e.getCapsule(this);
buildObject();
setPhysicsLocation((Vector3f) capsule.readSavable("physicsLocation", new Vector3f()));
setPhysicsRotation(((Matrix3f) capsule.readSavable("physicsRotation", new Matrix3f())));
setCcdMotionThreshold(capsule.readFloat("ccdMotionThreshold", 0));
setCcdSweptSphereRadius(capsule.readFloat("ccdSweptSphereRadius", 0));
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class PhysicsVehicle method read.
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule capsule = im.getCapsule(this);
tuning = new VehicleTuning();
tuning.frictionSlip = capsule.readFloat("frictionSlip", 10.5f);
tuning.maxSuspensionTravelCm = capsule.readFloat("maxSuspensionTravelCm", 500f);
tuning.maxSuspensionForce = capsule.readFloat("maxSuspensionForce", 6000f);
tuning.suspensionCompression = capsule.readFloat("suspensionCompression", 0.83f);
tuning.suspensionDamping = capsule.readFloat("suspensionDamping", 0.88f);
tuning.suspensionStiffness = capsule.readFloat("suspensionStiffness", 5.88f);
wheels = capsule.readSavableArrayList("wheelsList", new ArrayList<VehicleWheel>());
motionState.setVehicle(this);
super.read(im);
}
use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.
the class CollisionShape method read.
public void read(JmeImporter im) throws IOException {
InputCapsule capsule = im.getCapsule(this);
this.scale = (Vector3f) capsule.readSavable("scale", new Vector3f(1, 1, 1));
this.margin = capsule.readFloat("margin", 0.0f);
}
Aggregations