Search in sources :

Example 46 with Point2d

use of javax.vecmath.Point2d in project bb4-common by bb4.

the class MathUtilTest method testFindAngle.

@Test
public void testFindAngle() {
    Point2d point = new Point2d(1.0, 1.0);
    for (double x = 0; x < 2.0 * Math.PI; x += 0.3) {
        Point2d toPoint = new Point2d(point.x + Math.cos(x), point.y + Math.sin(x));
        System.out.println("angle to " + toPoint + " is " + MathUtil.getDirectionTo(point, toPoint));
    }
    assertEquals("Unexpected angle.", Math.PI / 4.0, MathUtil.getDirectionTo(point, new Point2d(2.0, 2.0)), 0);
    assertEquals("Unexpected angle.", 3.0 * Math.PI / 4.0, MathUtil.getDirectionTo(point, new Point2d(0.0, 2.0)), 0);
    assertEquals("Unexpected angle.", 5.0 * Math.PI / 4.0 - 2.0 * Math.PI, MathUtil.getDirectionTo(point, new Point2d(0.0, 0.0)), 0);
    assertEquals("Unexpected angle.", -Math.PI / 4.0, MathUtil.getDirectionTo(point, new Point2d(2.0, 0.0)), 0);
}
Also used : Point2d(javax.vecmath.Point2d) Test(org.junit.Test)

Example 47 with Point2d

use of javax.vecmath.Point2d in project chordatlas by twak.

the class SolverState method debugSolverResult.

public void debugSolverResult() {
    new Plot(mesh).add(miniPainter()).add(new ICanPaint() {

        @Override
        public void paint(Graphics2D g, PanMouseAdaptor ma) {
            Set<HalfEdge> seen = new HashSet<>();
            Color tWhite = new Color(255, 255, 255, 150);
            if (!seen.isEmpty())
                for (HalfFace f : mesh) {
                    for (HalfEdge e : f) {
                        int i = ((SuperEdge) e).profI;
                        // if (i == -1)
                        // continue;
                        Point2d loc = e.line().fromPPram(0.5);
                        String s = "" + i;
                        int offset = e.start.x < e.end.x ? -10 : 10;
                        seen.add(e);
                        Rectangle2D b = g.getFontMetrics().getStringBounds(s, g);
                        b = new Rectangle2D.Double(0, 0, b.getWidth() + 4, b.getHeight());
                        g.setColor(tWhite);
                        g.fillRect(ma.toX(loc.x) - (int) (b.getWidth() / 2), offset + ma.toY(loc.y) - (int) (b.getHeight() / 2), (int) (b.getWidth()), (int) (b.getHeight()));
                        g.setColor(Color.gray);
                        g.drawString(s, ma.toX(loc.x) - (int) (b.getWidth() / 2) + 2, offset + ma.toY(loc.y) + (int) (b.getHeight() / 2) - 3);
                    }
                }
        }
    });
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) Plot(org.twak.utils.ui.Plot) Color(java.awt.Color) Rectangle2D(java.awt.geom.Rectangle2D) HalfEdge(org.twak.utils.geom.HalfMesh2.HalfEdge) HalfFace(org.twak.utils.geom.HalfMesh2.HalfFace) ICanPaint(org.twak.utils.PaintThing.ICanPaint) MFPoint(org.twak.tweed.gen.FeatureCache.MFPoint) ICanPaint(org.twak.utils.PaintThing.ICanPaint) Graphics2D(java.awt.Graphics2D) Point2d(javax.vecmath.Point2d) PanMouseAdaptor(org.twak.utils.PanMouseAdaptor)

Example 48 with Point2d

use of javax.vecmath.Point2d in project chordatlas by twak.

the class VizSkelGen method toHalf.

private SuperFace toHalf(Loop<Point3d> loop) {
    Cache<Point3d, Point2d> look = new Cach<>(x -> Pointz.to2(x));
    HalfEdge last = null, first = null;
    SuperFace out = new SuperFace();
    for (Loopable<Point3d> edge : loop.loopableIterator()) {
        SuperEdge e = new SuperEdge(look.get(edge.get()), look.get(edge.getNext().get()), null);
        if (first == null)
            first = e;
        if (last != null)
            last.next = e;
        e.face = out;
        // !
        e.prof = null;
        e.mini = Collections.EMPTY_LIST;
        if (mode == Mode.Profiles)
            for (Line l : footprint) {
                if (l.absAngle(e.line()) < 0.1 && l.distance(e.start, true) < 1.5 && l.distance(e.end, true) < 1.5) {
                    SuperLine sl = (SuperLine) l;
                    MegaFacade mf = sl.getMega();
                    e.prof = findProf(e.start, e.end, sl, mf);
                }
            }
        last = e;
    }
    last.next = first;
    out.e = first;
    SkelFootprint.meanModeHeightColor(Loopz.toXZLoop(loop), out, blockGen);
    if (mode == Mode.CE) {
        for (HalfEdge ee : out) {
            SuperEdge e = (SuperEdge) ee;
            Matrix4d m = new Matrix4d();
            m.setIdentity();
            e.prof = new Prof(m, new Vector3d());
            e.prof.add(new Point2d(0, 0));
            e.prof.add(new Point2d(0, out.height));
            e.prof.add(new Point2d(-1, out.height + 1));
        }
    }
    return out;
}
Also used : MegaFacade(org.twak.tweed.gen.ProfileGen.MegaFacade) HalfEdge(org.twak.utils.geom.HalfMesh2.HalfEdge) Line(org.twak.utils.Line) SuperLine(org.twak.viewTrace.SuperLine) Matrix4d(javax.vecmath.Matrix4d) Point2d(javax.vecmath.Point2d) Vector3d(javax.vecmath.Vector3d) Point3d(javax.vecmath.Point3d) SuperLine(org.twak.viewTrace.SuperLine) Cach(org.twak.utils.Cach)

Example 49 with Point2d

use of javax.vecmath.Point2d in project chordatlas by twak.

the class FacadeTool method renderFacades.

private void renderFacades(Node gNode, String blockName, FacadeFinder ff) {
    Thread thread = new Thread() {

        @Override
        public void run() {
            File blockFile = new File(Tweed.DATA + File.separator + FeatureCache.FEATURE_FOLDER + File.separator + blockName);
            if (GISGen.mode == Mode.RENDER_SELECTED_BLOCK)
                try {
                    FileUtils.deleteDirectory(blockFile);
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            for (int mfi = 0; mfi < ff.results.size(); mfi++) {
                ToProjMega tpm = ff.results.get(mfi);
                if (tpm.size() == 0 || tpm.stream().mapToInt(x -> tpm.size()).sum() == 0)
                    continue;
                File megaFolder = new File(blockFile, "" + mfi);
                megaFolder.mkdirs();
                try {
                    new XStream().toXML(tpm.megafacade, new FileOutputStream(new File(megaFolder, LINE_XML)));
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                }
                // print a list of panoramas on this side.
                // List<Double> rots = new ArrayList();
                // 
                // for (ToProject tp : tpm)
                // for ( Pano pano : tp.toProject ) {
                // ImagePlaneGen pg = new ImagePlaneGen( tweed, (float) tp.e.x, (float) tp.e.y, (float) tp.s.x, (float) tp.s.y, (float) tp.minHeight, (float) tp.maxHeight, tp.toProject );
                // pg.fudgeToDepth( pixelsPerMeter, pano, rots );
                // }
                // 
                double rot = 0;
                // if (!rots.isEmpty())
                // rot = biggestClusterMean(rots);// rots.stream().mapToDouble( x -> x ).average().getAsDouble();
                // System.out.println ( "avg rot was "+rot );
                List<BufferedImage> images = new ArrayList<>();
                for (int fc = 0; fc < tpm.size(); fc++) {
                    // if (mfi != 2 || fc != 0)
                    // continue;
                    ToProject tp = tpm.get(fc);
                    // if (!tp.toProject.iterator().next().name.contains( "hfhGoIsR24hezjXpuIqklw" ))
                    // continue;
                    System.out.println("mega " + mfi + " pano " + fc);
                    File imageFolder;
                    String imageFilename = null;
                    // if ( GISGen.mode == Mode.RENDER_SELECTED_FACADE ) {
                    imageFolder = new File(megaFolder, "" + fc);
                    imageFilename = FeatureCache.RENDERED_IMAGE;
                    // }
                    // else
                    // imageFolder = new File( blockName );
                    imageFolder.mkdirs();
                    if (tp.toProject.size() != 1)
                        throw new Error();
                    ImagePlaneGen pg = new ImagePlaneGen(tweed, (float) tp.e.x, (float) tp.e.y, (float) tp.s.x, (float) tp.s.y, (float) tp.minHeight, (float) tp.maxHeight, tp.toProject);
                    if (GISGen.mode != Mode.RENDER_ALL_BLOCKS)
                        tweed.frame.addGen(pg, true);
                    for (Pano pano_ : tp.toProject) {
                        Pano pano = new Pano(pano_);
                        pano.set(pano.oa1 - (float) rot, pano.oa2, pano.oa3);
                        if (imageFilename == null)
                            imageFilename = new File(pano.name).getName() + "_" + tpm.megafacade.start + "_" + tpm.megafacade.end;
                        BufferedImage bi = pg.render(imageFolder, pixelsPerMeter, pano, tpm.megafacade, imageFilename);
                        if (GISGen.mode == Mode.RENDER_SELECTED_BLOCK)
                            images.add(bi);
                        try {
                            FileWriter out = new FileWriter(new File(imageFolder, "meta.txt"));
                            out.write(pixelsPerMeter * 10 + " " + (tp.s.distance(tp.e) * pixelsPerMeter - pixelsPerMeter * 20) + " " + (tp.maxHeight - tp.minHeight) * pixelsPerMeter + "\n");
                            out.write(pg.toString() + "\n");
                            out.write(pano.orig.getName() + "\n");
                            Point2d cen = tpm.megafacade.project(new Point2d(pano.location.x, pano.location.z), false);
                            out.write(tp.s.x + " " + tp.s.y + " " + tp.e.x + " " + tp.e.y + " " + cen.x + " " + cen.y + " " + pano.location.x + " " + pano.location.z + "\n");
                            out.close();
                        } catch (Throwable th) {
                            th.printStackTrace();
                        }
                    }
                }
                if (GISGen.mode == Mode.RENDER_SELECTED_BLOCK)
                    Imagez.writeSummary(new File(megaFolder, "summary.png"), images);
            }
        }
    };
    if (GISGen.mode == Mode.RENDER_SELECTED_BLOCK)
        thread.start();
    else
        thread.run();
}
Also used : XStream(com.thoughtworks.xstream.XStream) ToProjMega(org.twak.viewTrace.FacadeFinder.ToProjMega) ActionListener(java.awt.event.ActionListener) CentroidCluster(org.apache.commons.math3.ml.clustering.CentroidCluster) ClickMe(org.twak.tweed.ClickMe) FacadeMode(org.twak.viewTrace.FacadeFinder.FacadeMode) Vector2f(com.jme3.math.Vector2f) HashMap(java.util.HashMap) Clusterable(org.apache.commons.math3.ml.clustering.Clusterable) Tweed(org.twak.tweed.Tweed) Pano(org.twak.tweed.gen.Pano) ArrayList(java.util.ArrayList) Mode(org.twak.tweed.gen.GISGen.Mode) Node(com.jme3.scene.Node) ObjRead(org.twak.utils.geom.ObjRead) Spatial(com.jme3.scene.Spatial) Map(java.util.Map) JComboBox(javax.swing.JComboBox) KMeansPlusPlusClusterer(org.apache.commons.math3.ml.clustering.KMeansPlusPlusClusterer) Point3d(javax.vecmath.Point3d) Imagez(org.twak.tweed.dbg.Imagez) LoopL(org.twak.utils.collections.LoopL) BlockGen(org.twak.tweed.gen.BlockGen) BufferedImage(java.awt.image.BufferedImage) ListDownLayout(org.twak.utils.ui.ListDownLayout) FileWriter(java.io.FileWriter) ToProject(org.twak.viewTrace.FacadeFinder.ToProject) Vector3f(com.jme3.math.Vector3f) FileOutputStream(java.io.FileOutputStream) IOException(java.io.IOException) FileUtils(org.apache.commons.io.FileUtils) ActionEvent(java.awt.event.ActionEvent) Collectors(java.util.stream.Collectors) File(java.io.File) FileNotFoundException(java.io.FileNotFoundException) FacadeFinder(org.twak.viewTrace.FacadeFinder) Loopz(org.twak.utils.collections.Loopz) Point2d(javax.vecmath.Point2d) List(java.util.List) JLabel(javax.swing.JLabel) ImagePlaneGen(org.twak.tweed.gen.ImagePlaneGen) PlanesGen(org.twak.tweed.gen.PlanesGen) GISGen(org.twak.tweed.gen.GISGen) PanoGen(org.twak.tweed.gen.PanoGen) JPanel(javax.swing.JPanel) FeatureCache(org.twak.tweed.gen.FeatureCache) Gen(org.twak.tweed.gen.Gen) ToProject(org.twak.viewTrace.FacadeFinder.ToProject) XStream(com.thoughtworks.xstream.XStream) ToProjMega(org.twak.viewTrace.FacadeFinder.ToProjMega) FileWriter(java.io.FileWriter) FileNotFoundException(java.io.FileNotFoundException) ArrayList(java.util.ArrayList) IOException(java.io.IOException) BufferedImage(java.awt.image.BufferedImage) Point2d(javax.vecmath.Point2d) FileOutputStream(java.io.FileOutputStream) Pano(org.twak.tweed.gen.Pano) ImagePlaneGen(org.twak.tweed.gen.ImagePlaneGen) File(java.io.File)

Example 50 with Point2d

use of javax.vecmath.Point2d in project chordatlas by twak.

the class Slice method buildUI.

private void buildUI() {
    ma = new PanMouseAdaptor(this);
    ma.center(new Point2d((max[flatAxis[0]] - min[flatAxis[0]]) / 2 + min[flatAxis[0]], (max[flatAxis[1]] - min[flatAxis[1]]) / 2 + min[flatAxis[1]]));
    ma.setZoom(16);
    JFrame jf = new JFrame("slice");
    WindowManager.register(jf);
    jf.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
        // System.exit(0);
        }
    });
    jf.setLayout(new BorderLayout());
    this.setPreferredSize(new Dimension(600, 600));
    jf.add(this, BorderLayout.CENTER);
    final JSlider heightSlider = new JSlider(SwingConstants.VERTICAL, (int) (min[majorAxis] * sliderScale), (int) (max[majorAxis] * sliderScale), (int) ((max[majorAxis] - min[majorAxis]) * 0.5 + min[majorAxis]) * sliderScale);
    final JSlider lineSlider = new JSlider(SwingConstants.VERTICAL, -1, 50, -1);
    heightSlider.setPaintLabels(false);
    final ChangeListener cl;
    heightSlider.addChangeListener(cl = new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent arg0) {
            sliceHeight = heightSlider.getValue() / (double) sliderScale;
            LineSoup rawSoup = sliceMesh(rawMesh, sliceHeight);
            slice = sliceMesh(filteredMesh, sliceHeight);
            foundLines = new FindLines(slice, gisBias, lineSlider.getValue(), rawSoup.clique(P.CL_HIGH, P.CL_LOW), P);
            Concarnie cc = new Concarnie(foundLines.result, foundLines.cliques, P);
            // Concarnie cc = new Concarnie(slice, rawSoup.clique() );
            carnieSoup = cc.graph;
            carnie = cc.out;
            Slice.this.repaint();
        }
    });
    cl.stateChanged(null);
    lineSlider.addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent e) {
            cl.stateChanged(null);
        }
    });
    final JSlider parameterScaleSlider = new JSlider(SwingConstants.VERTICAL, 0, 2000, (int) (P.getScale() * 100));
    parameterScaleSlider.addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent e) {
            P.setScale(parameterScaleSlider.getValue() / 100.);
        }
    });
    JButton go = new JButton("support");
    go.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            setupObj(new ObjRead(toSlice));
        // supportPoints.clear();
        // Slice.this.repaint();
        // SwingUtilities.invokeLater(new Runnable() {
        // @Override
        // public void run() {
        // PerpSupport ps = new PerpSupport(slice, gis);
        // Slice.this.supportMax = ps.supportMax;
        // Slice.this.supportPoints = ps.supportPoints;
        // Slice.this.repaint();
        // }
        // });
        }
    });
    JButton fs = new JButton("full support");
    fs.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            Set<Point2d> points = new HashSet();
            for (double v = min[majorAxis]; v < max[majorAxis]; v += 0.01) {
                System.out.println("processing slice " + v + " / " + max[majorAxis]);
                slice = sliceMesh(filteredMesh, sliceHeight);
                for (SupportPoint sp : new PerpSupport(slice, gis).supportPoints) points.add(new Point2d(sp.support, max[majorAxis] - v));
            }
            System.out.println("found " + points.size() + " pts");
            new Plot(points);
        }
    });
    JButton ge = new JButton("lines");
    ge.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            foundLines = new FindLines(slice, gisBias, lineSlider.getValue(), slice.clique(P.CL_HIGH, P.CL_LOW), P);
            Slice.this.repaint();
        }
    });
    JButton cc = new JButton("carnie");
    cc.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            LineSoup rawSoup = sliceMesh(rawMesh, sliceHeight);
            foundLines = new FindLines(slice, gisBias, lineSlider.getValue(), rawSoup.clique(P.CL_HIGH, P.CL_LOW), P);
            Concarnie cc = new Concarnie(foundLines.result, foundLines.cliques, P);
            carnieSoup = cc.graph;
            carnie = cc.out;
            Slice.this.repaint();
        }
    });
    JButton ob = new JButton("dump");
    ob.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            ObjDump out = new ObjDump();
            double delta = 2.5;
            for (double d = min[majorAxis]; d <= max[majorAxis]; d += delta) {
                System.out.println(d + " / " + max[majorAxis]);
                boolean error;
                int count = 0;
                do {
                    error = false;
                    try {
                        LineSoup rawSoup = sliceMesh(rawMesh, d);
                        slice = sliceMesh(filteredMesh, d);
                        foundLines = new FindLines(slice, null, lineSlider.getValue(), rawSoup.clique(P.CL_HIGH, P.CL_LOW), P);
                        // foundLines = new FindLines(slice, gisBias, lineSlider.getValue(), rawSoup.clique(P.CL_HIGH, P.CL_LOW), P);
                        Concarnie c = new Concarnie(foundLines.result, foundLines.cliques, P);
                        // 
                        extrude(out, c.out, d, d + delta);
                        // capAtHeight (out, c.out, false, d );
                        capAtHeight(out, c.out, true, d + delta);
                    } catch (Throwable th) {
                        error = true;
                    }
                } while (error && count++ < 10);
            }
            out.dump(new File(Tweed.SCRATCH + "test2.obj"));
        }
    });
    JButton an = new JButton("anim");
    an.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            BufferedImage bi = new BufferedImage(Slice.this.getWidth(), Slice.this.getHeight(), BufferedImage.TYPE_3BYTE_BGR);
            for (File f : new File(Tweed.SCRATCH + "vid").listFiles()) f.delete();
            int c = 0;
            for (int i = heightSlider.getMinimum(); i < heightSlider.getMaximum(); i += 100) {
                heightSlider.setValue(i);
                Slice.this.paintComponent(bi.getGraphics());
                try {
                    ImageIO.write(bi, "png", new File(String.format(Tweed.SCRATCH + "vid/%05d.png", c++)));
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    });
    JButton sl = new JButton("global");
    sl.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            new SliceSolver(new File(Tweed.SCRATCH + "test2.obj"), Slice.this, P);
        }
    });
    JButton pr = new JButton("profiles");
    pr.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            double delta = 0.5;
            BufferedImage out = new BufferedImage(Slice.this.getWidth(), Slice.this.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
            Graphics2D g2 = (Graphics2D) out.getGraphics();
            g2.setColor(Color.white);
            g2.fillRect(0, 0, getWidth(), getHeight());
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setColor(new Color(0, 0, 0, 50));
            for (double d = min[majorAxis]; d <= max[majorAxis]; d += delta) {
                System.out.println(d + " / " + max[majorAxis]);
                boolean error;
                int count = 0;
                do {
                    error = false;
                    try {
                        LineSoup rawSoup = sliceMesh(rawMesh, d);
                        slice = sliceMesh(filteredMesh, d);
                        FindLines fl = new FindLines(slice, gisBias, lineSlider.getValue(), rawSoup.clique(P.CL_HIGH, P.CL_LOW), P);
                        PaintThing.paint(fl.result, g2, ma);
                    // Concarnie c = new Concarnie(foundLines.result, foundLines.cliques, P);
                    } catch (Throwable th) {
                        error = true;
                    }
                } while (error && count++ < 10);
            }
            g2.dispose();
            try {
                ImageIO.write(out, "png", new File(Tweed.SCRATCH + "lines"));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    });
    final JCheckBox sg = new JCheckBox("gis", true);
    sg.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            showGis = sg.isSelected();
            Slice.this.repaint();
        }
    });
    final JCheckBox sf = new JCheckBox("fit", true);
    sf.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            showFit = sf.isSelected();
            Slice.this.repaint();
        }
    });
    final JCheckBox sc = new JCheckBox("poly-out", true);
    sc.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            showCarnie = sc.isSelected();
            Slice.this.repaint();
        }
    });
    final JCheckBox ss = new JCheckBox("slice", true);
    ss.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            showSlice = ss.isSelected();
            Slice.this.repaint();
        }
    });
    JPanel buttons = new JPanel(new ListDownLayout());
    buttons.add(go);
    buttons.add(fs);
    buttons.add(ge);
    buttons.add(cc);
    buttons.add(an);
    buttons.add(ob);
    buttons.add(sl);
    buttons.add(pr);
    buttons.add(sg);
    buttons.add(sf);
    buttons.add(sc);
    buttons.add(ss);
    buttons.add(lineSlider);
    JPanel controls = new JPanel(new BorderLayout());
    controls.add(heightSlider, BorderLayout.CENTER);
    controls.add(parameterScaleSlider, BorderLayout.WEST);
    controls.add(buttons, BorderLayout.EAST);
    jf.add(controls, BorderLayout.EAST);
    jf.pack();
    jf.setVisible(true);
}
Also used : JPanel(javax.swing.JPanel) ListDownLayout(org.twak.utils.ui.ListDownLayout) Set(java.util.Set) HashSet(java.util.HashSet) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) WindowAdapter(java.awt.event.WindowAdapter) ObjRead(org.twak.utils.geom.ObjRead) BufferedImage(java.awt.image.BufferedImage) BorderLayout(java.awt.BorderLayout) JFrame(javax.swing.JFrame) ObjDump(org.twak.utils.geom.ObjDump) JSlider(javax.swing.JSlider) ChangeListener(javax.swing.event.ChangeListener) HashSet(java.util.HashSet) Plot(org.twak.utils.ui.Plot) Color(java.awt.Color) Dimension(java.awt.Dimension) IOException(java.io.IOException) Graphics2D(java.awt.Graphics2D) JCheckBox(javax.swing.JCheckBox) ChangeEvent(javax.swing.event.ChangeEvent) ActionListener(java.awt.event.ActionListener) Point2d(javax.vecmath.Point2d) PanMouseAdaptor(org.twak.utils.PanMouseAdaptor) WindowEvent(java.awt.event.WindowEvent) File(java.io.File)

Aggregations

Point2d (javax.vecmath.Point2d)84 Line (org.twak.utils.Line)37 ArrayList (java.util.ArrayList)29 Point3d (javax.vecmath.Point3d)27 List (java.util.List)18 Vector2d (javax.vecmath.Vector2d)17 SuperLine (org.twak.viewTrace.SuperLine)17 File (java.io.File)15 Vector3d (javax.vecmath.Vector3d)15 Map (java.util.Map)14 HalfEdge (org.twak.utils.geom.HalfMesh2.HalfEdge)14 HashMap (java.util.HashMap)13 Loop (org.twak.utils.collections.Loop)13 Collectors (java.util.stream.Collectors)12 IOException (java.io.IOException)11 HashSet (java.util.HashSet)11 Set (java.util.Set)11 Tweed (org.twak.tweed.Tweed)11 Matrix4d (javax.vecmath.Matrix4d)10 LinearForm (org.twak.utils.geom.LinearForm)10