Search in sources :

Example 16 with InputCapsule

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

the class Cylinder method read.

@Override
public void read(JmeImporter e) throws IOException {
    super.read(e);
    InputCapsule capsule = e.getCapsule(this);
    axisSamples = capsule.readInt("axisSamples", 0);
    radialSamples = capsule.readInt("radialSamples", 0);
    radius = capsule.readFloat("radius", 0);
    radius2 = capsule.readFloat("radius2", 0);
    height = capsule.readFloat("height", 0);
    closed = capsule.readBoolean("closed", false);
    inverted = capsule.readBoolean("inverted", false);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 17 with InputCapsule

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

the class Dome method read.

@Override
public void read(JmeImporter e) throws IOException {
    super.read(e);
    InputCapsule capsule = e.getCapsule(this);
    planes = capsule.readInt("planes", 0);
    radialSamples = capsule.readInt("radialSamples", 0);
    radius = capsule.readFloat("radius", 0);
    center = (Vector3f) capsule.readSavable("center", Vector3f.ZERO.clone());
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 18 with InputCapsule

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

the class ShaderNodeDefinition method read.

/**
     * jme serialization (not used)
     *
     * @param im the importer
     * @throws IOException
     */
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = (InputCapsule) im.getCapsule(this);
    name = ic.readString("name", "");
    String[] str = ic.readStringArray("shadersLanguage", null);
    if (str != null) {
        shadersLanguage = Arrays.asList(str);
    } else {
        shadersLanguage = new ArrayList<String>();
    }
    str = ic.readStringArray("shadersPath", null);
    if (str != null) {
        shadersPath = Arrays.asList(str);
    } else {
        shadersPath = new ArrayList<String>();
    }
    type = ic.readEnum("type", Shader.ShaderType.class, null);
    inputs = (List<ShaderNodeVariable>) ic.readSavableArrayList("inputs", new ArrayList<ShaderNodeVariable>());
    outputs = (List<ShaderNodeVariable>) ic.readSavableArrayList("outputs", new ArrayList<ShaderNodeVariable>());
}
Also used : InputCapsule(com.jme3.export.InputCapsule) ShaderType(com.jme3.shader.Shader.ShaderType)

Example 19 with InputCapsule

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

the class VariableMapping method read.

/**
     * jme serialization (not used)
     *
     * @param im the importer
     * @throws IOException
     */
@Override
public void read(JmeImporter im) throws IOException {
    InputCapsule ic = (InputCapsule) im.getCapsule(this);
    leftVariable = (ShaderNodeVariable) ic.readSavable("leftVariable", null);
    rightVariable = (ShaderNodeVariable) ic.readSavable("rightVariable", null);
    condition = ic.readString("condition", "");
    leftSwizzling = ic.readString("leftSwizzling", "");
    rightSwizzling = ic.readString("rightSwizzling", "");
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

Example 20 with InputCapsule

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

the class DirectionalLightShadowRenderer method read.

@Override
public void read(JmeImporter im) throws IOException {
    super.read(im);
    InputCapsule ic = im.getCapsule(this);
    lambda = ic.readFloat("lambda", 0.65f);
    zFarOverride = ic.readInt("zFarOverride", 0);
    light = (DirectionalLight) ic.readSavable("light", null);
    fadeInfo = (Vector2f) ic.readSavable("fadeInfo", null);
    fadeLength = ic.readFloat("fadeLength", 0f);
    init(nbShadowMaps, (int) shadowMapSize);
}
Also used : InputCapsule(com.jme3.export.InputCapsule)

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