Search in sources :

Example 86 with InputCapsule

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);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 87 with InputCapsule

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;
    }
}
Also used : InputCapsule(com.jme3.export.InputCapsule) ArrayList(java.util.ArrayList) List(java.util.List)

Example 88 with InputCapsule

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);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 89 with InputCapsule

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);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 90 with InputCapsule

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);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Aggregations

InputCapsule (com.jme3.export.InputCapsule)123 Vector3f (com.jme3.math.Vector3f)18 Matrix3f (com.jme3.math.Matrix3f)5 ArrayList (java.util.ArrayList)5 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 LinkerMsg (com.cas.circuit.msg.LinkerMsg)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