Search in sources :

Example 6 with Spline

use of com.jme3.math.Spline in project jmonkeyengine by jMonkeyEngine.

the class MotionPath method CreateCatmullRomPath.

private Geometry CreateCatmullRomPath() {
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.getAdditionalRenderState().setWireframe(true);
    mat.setColor("Color", ColorRGBA.Blue);
    Geometry lineGeometry = new Geometry("line", new Curve(spline, 10));
    lineGeometry.setMaterial(mat);
    return lineGeometry;
}
Also used : Geometry(com.jme3.scene.Geometry) Curve(com.jme3.scene.shape.Curve) Material(com.jme3.material.Material)

Aggregations

Curve (com.jme3.scene.shape.Curve)5 Spline (com.jme3.math.Spline)3 Pointer (com.jme3.scene.plugins.blender.file.Pointer)3 FloatBuffer (java.nio.FloatBuffer)3 Material (com.jme3.material.Material)2 Vector3f (com.jme3.math.Vector3f)2 Geometry (com.jme3.scene.Geometry)2 DynamicArray (com.jme3.scene.plugins.blender.file.DynamicArray)2 Structure (com.jme3.scene.plugins.blender.file.Structure)2 ArrayList (java.util.ArrayList)2 Vector4f (com.jme3.math.Vector4f)1 Node (com.jme3.scene.Node)1 IndexBuffer (com.jme3.scene.mesh.IndexBuffer)1 BlenderInputStream (com.jme3.scene.plugins.blender.file.BlenderInputStream)1 FileBlockHeader (com.jme3.scene.plugins.blender.file.FileBlockHeader)1 Face (com.jme3.scene.plugins.blender.meshes.Face)1 Surface (com.jme3.scene.shape.Surface)1 List (java.util.List)1