Search in sources :

Example 6 with InputCapsule

use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.

the class LowPassFilter method read.

@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    volume = ic.readFloat("volume", 0);
    highFreqVolume = ic.readFloat("hf_volume", 0);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 7 with InputCapsule

use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.

the class BoundingBox method read.

@Override
public void read(JmeImporter e) throws IOException {
    super.read(e);
    InputCapsule capsule = e.getCapsule(this);
    xExtent = capsule.readFloat("xExtent", 0);
    yExtent = capsule.readFloat("yExtent", 0);
    zExtent = capsule.readFloat("zExtent", 0);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 8 with InputCapsule

use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.

the class DQuaternion method read.

public void read(JmeImporter e) throws IOException {
    InputCapsule cap = e.getCapsule(this);
    x = cap.readFloat("x", 0);
    y = cap.readFloat("y", 0);
    z = cap.readFloat("z", 0);
    w = cap.readFloat("w", 1);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 9 with InputCapsule

use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.

the class DTransform method read.

public void read(JmeImporter e) throws IOException {
    InputCapsule capsule = e.getCapsule(this);
    rotation = (DQuaternion) capsule.readSavable("rot", new DQuaternion());
    translation = (Vector3d) capsule.readSavable("translation", Vector3d.ZERO);
    scale = (Vector3d) capsule.readSavable("scale", Vector3d.UNIT_XYZ);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 10 with InputCapsule

use of com.jme3.export.InputCapsule in project jmonkeyengine by jMonkeyEngine.

the class BetterCharacterControl method read.

@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule in = im.getCapsule(this);
    this.radius = in.readFloat("radius", 1);
    this.height = in.readFloat("height", 2);
    this.mass = in.readFloat("mass", 80);
    this.physicsDamping = in.readFloat("physicsDamping", 0.9f);
    this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0)));
    rigidBody = new PhysicsRigidBody(getShape(), mass);
    jumpForce.set(new Vector3f(0, mass * 5, 0));
    rigidBody.setAngularFactor(0);
}
Also used : InputCapsule(com.jme3.export.InputCapsule) Vector3f(com.jme3.math.Vector3f) PhysicsRigidBody(com.jme3.bullet.objects.PhysicsRigidBody)

Aggregations

InputCapsule (com.jme3.export.InputCapsule)119 Vector3f (com.jme3.math.Vector3f)18 Matrix3f (com.jme3.math.Matrix3f)5 ArrayList (java.util.ArrayList)4 AssetNotFoundException (com.jme3.asset.AssetNotFoundException)2 PhysicsRigidBody (com.jme3.bullet.objects.PhysicsRigidBody)2 Mesh (com.jme3.scene.Mesh)2 ShadowCompareMode (com.jme3.texture.Texture.ShadowCompareMode)2 ConvexShape (com.bulletphysics.collision.shapes.ConvexShape)1 KinematicCharacterController (com.bulletphysics.dynamics.character.KinematicCharacterController)1 Generic6DofConstraint (com.bulletphysics.dynamics.constraintsolver.Generic6DofConstraint)1 HingeConstraint (com.bulletphysics.dynamics.constraintsolver.HingeConstraint)1 SliderConstraint (com.bulletphysics.dynamics.constraintsolver.SliderConstraint)1 Transform (com.bulletphysics.linearmath.Transform)1 LoopMode (com.jme3.animation.LoopMode)1 AssetInfo (com.jme3.asset.AssetInfo)1 AssetKey (com.jme3.asset.AssetKey)1 AssetManager (com.jme3.asset.AssetManager)1 ModelKey (com.jme3.asset.ModelKey)1 BoundingBox (com.jme3.bounding.BoundingBox)1