Search in sources :

Example 56 with OutputCapsule

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

the class SimplexCollisionShape method write.

public void write(JmeExporter ex) throws IOException {
    super.write(ex);
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(vector1, "simplexPoint1", null);
    capsule.write(vector2, "simplexPoint2", null);
    capsule.write(vector3, "simplexPoint3", null);
    capsule.write(vector4, "simplexPoint4", null);
}
Also used : OutputCapsule(com.jme3.export.OutputCapsule)

Example 57 with OutputCapsule

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

the class BoxCollisionShape method write.

public void write(JmeExporter ex) throws IOException {
    super.write(ex);
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(halfExtents, "halfExtents", new Vector3f(1, 1, 1));
}
Also used : OutputCapsule(com.jme3.export.OutputCapsule) Vector3f(com.jme3.math.Vector3f)

Example 58 with OutputCapsule

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

the class CapsuleCollisionShape method write.

public void write(JmeExporter ex) throws IOException {
    super.write(ex);
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(radius, "radius", 0.5f);
    capsule.write(height, "height", 1);
    capsule.write(axis, "axis", 1);
}
Also used : OutputCapsule(com.jme3.export.OutputCapsule)

Example 59 with OutputCapsule

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

the class VehicleWheel method write.

@Override
public void write(JmeExporter ex) throws IOException {
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(wheelSpatial, "wheelSpatial", null);
    capsule.write(frontWheel, "frontWheel", false);
    capsule.write(location, "wheelLocation", new Vector3f());
    capsule.write(direction, "wheelDirection", new Vector3f());
    capsule.write(axle, "wheelAxle", new Vector3f());
    capsule.write(suspensionStiffness, "suspensionStiffness", 20.0f);
    capsule.write(wheelsDampingRelaxation, "wheelsDampingRelaxation", 2.3f);
    capsule.write(wheelsDampingCompression, "wheelsDampingCompression", 4.4f);
    capsule.write(frictionSlip, "frictionSlip", 10.5f);
    capsule.write(rollInfluence, "rollInfluence", 1.0f);
    capsule.write(maxSuspensionTravelCm, "maxSuspensionTravelCm", 500f);
    capsule.write(maxSuspensionForce, "maxSuspensionForce", 6000f);
    capsule.write(radius, "wheelRadius", 0.5f);
    capsule.write(restLength, "restLength", 1f);
}
Also used : Vector3f(com.jme3.math.Vector3f)

Example 60 with OutputCapsule

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

the class ChildCollisionShape method write.

public void write(JmeExporter ex) throws IOException {
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(location, "location", new Vector3f());
    capsule.write(rotation, "rotation", new Matrix3f());
    capsule.write(shape, "shape", new BoxCollisionShape(new Vector3f(1, 1, 1)));
}
Also used : Matrix3f(com.jme3.math.Matrix3f) Vector3f(com.jme3.math.Vector3f) BoxCollisionShape(com.jme3.bullet.collision.shapes.BoxCollisionShape)

Aggregations

OutputCapsule (com.jme3.export.OutputCapsule)119 Vector3f (com.jme3.math.Vector3f)17 Matrix3f (com.jme3.math.Matrix3f)4 SafeArrayList (com.jme3.util.SafeArrayList)2 ArrayList (java.util.ArrayList)2 Generic6DofConstraint (com.bulletphysics.dynamics.constraintsolver.Generic6DofConstraint)1 BoundingSphere (com.jme3.bounding.BoundingSphere)1 BoxCollisionShape (com.jme3.bullet.collision.shapes.BoxCollisionShape)1 ChildCollisionShape (com.jme3.bullet.collision.shapes.infos.ChildCollisionShape)1 RotationalLimitMotor (com.jme3.bullet.joints.motors.RotationalLimitMotor)1 Plane (com.jme3.math.Plane)1 Quaternion (com.jme3.math.Quaternion)1 Vector2f (com.jme3.math.Vector2f)1 Mesh (com.jme3.scene.Mesh)1 ShaderNodeVariable (com.jme3.shader.ShaderNodeVariable)1 List (java.util.List)1