Examples of ConvexHull


Examples of jinngine.geometry.ConvexHull

    vertices.add( new Vector3(-t,  0, -1).normalize());
    vertices.add( new Vector3(-t,  01).normalize());

    int n = 0;
    while (true) {
      ConvexHull hull = new ConvexHull(vertices);

      if (n>=depth)
        return hull;

      // for each face, add a new sphere support
      // point in direction of the face normal
      Iterator<Vector3[]> iter = hull.getFaces();
      while(iter.hasNext()) {
        Vector3[] face = iter.next();
        Vector3 normal =face[1].sub(face[0]).cross(face[2].sub(face[1])).normalize();
        vertices.add(new Vector3(normal));
      }
View Full Code Here

Examples of jinngine.geometry.ConvexHull

          dims.x*-0.5, dims.y*-0.5, dims.z*-0.5};
     
      return points;
   
    if ( g instanceof ConvexHull ) {
      ConvexHull hull = (ConvexHull)g;
      int n = hull.getNumberOfVertices();
      double points[] = new double[n*3];
      int i = 0; Iterator<Vector3> iter = hull.getVertices();

      Matrix3 T = new Matrix3();
      Vector3 t = new Vector3();
      g.getLocalTransform(T, t);
 
View Full Code Here

Examples of jmt.engine.jaba.Hull.ConvexHull

   */
  public Vector<newFace> Hull3D(Vector<Vertex> vertices) throws ConvexHullException {
    Vector<newFace> newfaces = new Vector<newFace>();

    // Lancio del metodo ConvexHull
    ConvexHull hull = new ConvexHull(vertices);

    // Recupero delle informazioni
    Vector<Polygon> faces = new Vector<Polygon>(hull.getFaces());
    Vector vertoffaces = new Vector();
    Vector<Vertex> vertof0 = new Vector<Vertex>(vertoffaces);

    for (int k = 0; k < faces.size(); k++) {
      vertof0 = faces.get(k).getVertices();
View Full Code Here

Examples of org.geotools.geometry.iso.util.algorithm2D.ConvexHull

   * (non-Javadoc)
   *
   * @see org.opengis.geometry.coordinate.root.Geometry#getConvexHull()
   */
  public Geometry getConvexHull() {
    ConvexHull ch = new ConvexHull(this);
    return ch.getConvexHull();   
  }
View Full Code Here

Examples of org.gephi.visualization.hull.ConvexHull

                Node parent = graph.getParent(n);
                if (parent != null) {
                    Group group = (Group) parent;
                    Model hullModel = group.getGroupData().getHullModel();
                    if (hullModel != null && hullModel.isCacheMatching(cacheMarker)) {
                        ConvexHull hull = (ConvexHull) hullModel.getObj();
                        hull.addNode(n);
                        hull.setModel(hullModel);
                    } else if (hullModel != null) {
                        //Its not the first time the hull exist
                        ConvexHullModel model = (ConvexHullModel) hullModel;
                        model.setScale(1f);
                        hullModel.setCacheMarker(cacheMarker);
                        hulls.add((ModelImpl) hullModel);
                    } else {
                        ConvexHull ch = new ConvexHull();
                        ch.setMetaNode(parent);
                        ch.addNode(n);
                        ModelImpl obj = potInit.initModel(ch);
                        group.getGroupData().setHullModel(obj);
                        obj.setCacheMarker(cacheMarker);
                        hulls.add(obj);
                    }
                }
            }
            for (ModelImpl im : hulls) {
                ConvexHull hull = (ConvexHull) im.getObj();
                hull.recompute();
                engine.addObject(AbstractEngine.CLASS_POTATO, im);
            }
        }
    }
View Full Code Here

Examples of org.gephi.visualization.hull.ConvexHull

            }

            for (Node parent : parents) {
                GroupData gd = (GroupData) parent.getNodeData();
                if (gd.getHullModel() != null) {
                    ConvexHull hull = ((ConvexHullModel) gd.getHullModel()).getObj();
                    contractPositioning(hull);
                }
                graph.retract(parent);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.gephi.visualization.hull.ConvexHull

* @author Mathieu Bastian
*/
public class CompatibilityHullModeler implements CompatibilityModeler<ConvexHull> {

    public ModelImpl initModel(Renderable n) {
        ConvexHull h = (ConvexHull) n;

        ConvexHullModel hull = new ConvexHullModel();
        hull.setObj(h);
        h.setModel(hull);

        return hull;
    }
View Full Code Here

Examples of org.jbox2d.testbed.tests.ConvexHull

    model.addTest(new RayCastTest());
    model.addTest(new EdgeShapes());

    // misc
    model.addCategory("Misc");
    model.addTest(new ConvexHull());
    model.addTest(new DynamicTreeTest());
    model.addTest(new DistanceTest());
    model.addTest(new LiquidTest());
  }
View Full Code Here

Examples of org.jbox2d.testbed.tests.ConvexHull

    model.addTest(new RayCastTest());
    model.addTest(new EdgeShapes());

    // misc
    model.addCategory("Misc");
    model.addTest(new ConvexHull());
    model.addTest(new DynamicTreeTest());
    model.addTest(new DistanceTest());
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.processing.ConvexHull

    /**
     * @see ConvexHull
     */
    public GeoPipeline toConvexHull() {
      return addPipe(new ConvexHull());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.