Package com.jme3.export

Examples of com.jme3.export.InputCapsule.readSavable()


  public void read(JmeImporter e) throws IOException {
    InputCapsule capsule = e.getCapsule(this);
    m_PointA = (Vector2f) capsule.readSavable("m_PointA", new Vector2f());
    m_PointB = (Vector2f) capsule.readSavable("m_PointB", new Vector2f());
    m_Normal = (Vector2f) capsule.readSavable("m_Normal", new Vector2f());
  }
}
View Full Code Here


  }

  public void read(JmeImporter e) throws IOException {
    InputCapsule capsule = e.getCapsule(this);
    id = capsule.readInt("id", -1);
    m_CellPlane = (Plane) capsule.readSavable("cellplane", new Plane());
    Savable[] sav = capsule.readSavableArray("vertex", new Vector3f[3]);
        for (int i = 0; i < sav.length; i++){
            m_Vertex[i] = (Vector3f) sav[i];
        }
    m_CenterPoint = (Vector3f) capsule.readSavable("center", new Vector3f());
View Full Code Here

    m_CellPlane = (Plane) capsule.readSavable("cellplane", new Plane());
    Savable[] sav = capsule.readSavableArray("vertex", new Vector3f[3]);
        for (int i = 0; i < sav.length; i++){
            m_Vertex[i] = (Vector3f) sav[i];
        }
    m_CenterPoint = (Vector3f) capsule.readSavable("center", new Vector3f());
    sav = capsule.readSavableArray("sides", new Line2D[3]);
        for (int i = 0; i < sav.length; i++){
            m_Side[i] = (Line2D) sav[i];
        }
    //done one level above in mesh
View Full Code Here

  }
  @Override
  public void read(JmeImporter im) throws IOException {
    InputCapsule ic = im.getCapsule(this);
    enabled = ic.readBoolean("enabled", true);
    spatial = (Spatial) ic.readSavable("spatial", null);
  }
}
View Full Code Here

    @Override
    public void read(JmeImporter im) throws IOException {
        super.read(im);
        InputCapsule ic = im.getCapsule(this);
        enabled = ic.readBoolean("enabled", true);
        spatial = (Spatial) ic.readSavable("spatial", null);
        applyLocal = ic.readBoolean("applyLocalPhysics", false);
        setUserObject(spatial);
    }
}
View Full Code Here

    @Override
    public void read(JmeImporter im) throws IOException {
        super.read(im);
        InputCapsule ic = im.getCapsule(this);
        mesh = (Mesh) ic.readSavable("mesh", null);

        material = null;
        String matName = ic.readString("materialName", null);
        if (matName != null) {
            // Material name is set,
View Full Code Here

                logger.log(Level.FINE, "Cannot locate {0} for geometry {1}", new Object[]{matName, key});
            }
        }
        // If material is NULL, try to load it from the geometry
        if (material == null) {
            material = (Material) ic.readSavable("material", null);
        }
        ignoreTransform = ic.readBoolean("ignoreTransform", false);

        if (ic.getSavableVersion(Geometry.class) == 0) {
            // Fix shared mesh (if set)
View Full Code Here

    public void read(JmeImporter im) throws IOException {
        super.read(im);
        InputCapsule ic = im.getCapsule(this);
        enabled = ic.readBoolean("enabled", true);
        kinematicSpatial = ic.readBoolean("kinematicSpatial", true);
        spatial = (Spatial) ic.readSavable("spatial", null);
        motionState.setApplyPhysicsLocal(ic.readBoolean("applyLocalPhysics", false));
        setUserObject(spatial);
    }
}
View Full Code Here

        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);
    }
}
View Full Code Here

        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());
    }

    @Override
    public void write(JmeExporter e) throws IOException {
        super.write(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.