Search in sources :

Example 1 with Plane

use of org.twak.tweed.gen.PlanesGen.Plane in project chordatlas by twak.

the class PlaneTool method dragStart.

@Override
public void dragStart(Geometry target, Vector2f screen, Vector3f d3) {
    plane = new Plane(Color.white);
    plane.a = new Vector3f(d3.x, 0, d3.z);
    plane.b = null;
}
Also used : Plane(org.twak.tweed.gen.PlanesGen.Plane) Vector3f(com.jme3.math.Vector3f)

Example 2 with Plane

use of org.twak.tweed.gen.PlanesGen.Plane in project chordatlas by twak.

the class PlaneTool method dragEnd.

@Override
public void dragEnd() {
    if (plane.a != null && plane.b != null && plane.a.distanceSquared(plane.b) > 4) {
        plane.color = pg.color;
        pg.planes.add(plane);
        pg.calculate();
    }
    plane = new Plane(Color.white);
    if (planeS != null)
        planeS.removeFromParent();
}
Also used : Plane(org.twak.tweed.gen.PlanesGen.Plane)

Aggregations

Plane (org.twak.tweed.gen.PlanesGen.Plane)2 Vector3f (com.jme3.math.Vector3f)1