Package toxi.geom

Examples of toxi.geom.Plane


        new Plane(this.getPlane().copy(), this.getPlane().normal.copy()));
    return copiedPlane;
  }

  public SlicePlane copy() {
    SlicePlane newSlicePlane = new SlicePlane(new Plane(this.plane.copy(),
        this.plane.normal.copy()));
    newSlicePlane.guide = this.guide;
    newSlicePlane.setSketch(this.getSketch().copy());
    newSlicePlane.selected = this.selected;
    newSlicePlane.getSketch().setOnSketchPlane(newSlicePlane);
View Full Code Here


public class PlaneTest extends TestCase {

    public void testContainment() {
        Triangle3D t = new Triangle3D(new Vec3D(-100, 0, 0), new Vec3D(0, 0,
                -100), new Vec3D(0, 0, 100));
        Plane pl = new Plane(t.computeCentroid(), t.computeNormal());
    }
View Full Code Here

        Plane pl = new Plane(t.computeCentroid(), t.computeNormal());
    }

    public void testProjection() {
        Vec3D origin = new Vec3D(0, 100, 0);
        Plane plane = new Plane(origin, new Vec3D(0, 1, 0));
        Vec3D proj;
        proj = plane.getProjectedPoint(new Vec3D());
        assertEquals(origin, proj);
        proj = plane.getProjectedPoint(new Vec3D(0, 200, 0));
        assertEquals(origin, proj);
        proj = plane.getProjectedPoint(origin);
        assertEquals(origin, proj);
    }
View Full Code Here

    private static void save() {
        try {
            JAXBGeomTest test = new JAXBGeomTest();
            test.box = new AABB();
            test.plane = new Plane();
            test.quat = new Quaternion(0, Vec3D.X_AXIS);
            test.ray = new Ray3D();
            test.rect = new Rect(0, 0, 100, 200);
            test.sphere = new Sphere();
            test.tri = new Triangle3D(new Vec3D(), new Vec3D(), new Vec3D());
View Full Code Here

    }

    public void setup() {
        size(1280, 720, OPENGL);
        gfx = new ToxiclibsSupport(this);
        p1 = new Plane(new Vec3D(100, 100, 100), new Vec3D(0, 1, 0));
        p2 = new Plane(new Vec3D(100, 200, 100),
                new Vec3D(1, 0, 0).rotateY(0.5f));
        p2.normal = p1.normal.copy();
    }
View Full Code Here

TOP

Related Classes of toxi.geom.Plane

Copyright © 2018 www.massapicom. 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.