Codota Logo
JavaFXMultiColorMeshBuilder.addPolyon
Code IndexAdd Codota to your IDE (free)

How to use
addPolyon
method
in
us.ihmc.javaFXToolkit.shapes.JavaFXMultiColorMeshBuilder

Best Java code snippets using us.ihmc.javaFXToolkit.shapes.JavaFXMultiColorMeshBuilder.addPolyon (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: us.ihmc/robot-environment-awareness-visualizers

private Node createBorderTrianglesGraphics(PlanarRegionSegmentationRawData rawData,
                     ConcaveHullFactoryResult concaveHullFactoryResult)
{
 JavaFXMultiColorMeshBuilder meshBuilder = new JavaFXMultiColorMeshBuilder(new TextureColorAdaptivePalette(512));
 Point3D planeOrigin = rawData.getOrigin();
 Vector3D planeNormal = rawData.getNormal();
 for (ConcaveHullVariables intermediateVariables : concaveHullFactoryResult.getIntermediateVariables())
 {
   Set<QuadEdgeTriangle> borderTriangles = intermediateVariables.getBorderTriangles();
   for (QuadEdgeTriangle borderTriangle : borderTriangles)
   {
    List<Point2D> triangleVerticesLocal = Arrays.stream(borderTriangle.getVertices()).map(v -> new Point2D(v.getX(), v.getY()))
       .collect(Collectors.toList());
    List<Point3D> triangleVerticesWorld = PolygonizerTools.toPointsInWorld(triangleVerticesLocal, planeOrigin, planeNormal);
    double hue = 360.0 * random.nextDouble();
    double saturation = 0.8 * random.nextDouble() + 0.1;
    double brightness = 0.9;
    meshBuilder.addPolyon(triangleVerticesWorld, Color.hsb(hue, saturation, brightness));
   }
 }
 MeshView trianglesMeshView = new MeshView(meshBuilder.generateMesh());
 trianglesMeshView.setMaterial(meshBuilder.generateMaterial());
 return trianglesMeshView;
}
origin: us.ihmc/robot-environment-awareness-visualizers

private Node createDelaunayTriangulationGraphics(PlanarRegionSegmentationRawData rawData,
                        ConcaveHullFactoryResult concaveHullFactoryResult)
{
 JavaFXMultiColorMeshBuilder meshBuilder = new JavaFXMultiColorMeshBuilder(new TextureColorAdaptivePalette(512));
 Point3D planeOrigin = rawData.getOrigin();
 Vector3D planeNormal = rawData.getNormal();
 List<QuadEdgeTriangle> allTriangles = concaveHullFactoryResult.getAllTriangles();
 for (QuadEdgeTriangle triangle : allTriangles)
 {
   List<Point2D> triangleVerticesLocal = Arrays.stream(triangle.getVertices()).map(v -> new Point2D(v.getX(), v.getY())).collect(Collectors.toList());
   triangleVerticesLocal.forEach(vertex -> {
    vertex.setX(vertex.getX() * scaleX);
    vertex.setY(vertex.getY() * scaleY);
   });
   List<Point3D> triangleVerticesWorld = PolygonizerTools.toPointsInWorld(triangleVerticesLocal, planeOrigin, planeNormal);
   double hue = 360.0 * random.nextDouble();
   double saturation = 0.8 * random.nextDouble() + 0.1;
   double brightness = 0.9;
   meshBuilder.addPolyon(triangleVerticesWorld, Color.hsb(hue, saturation, brightness));
 }
 MeshView trianglesMeshView = new MeshView(meshBuilder.generateMesh());
 trianglesMeshView.setMaterial(meshBuilder.generateMaterial());
 return trianglesMeshView;
}
origin: us.ihmc/robot-environment-awareness-visualizers

System.out.println(intersections);
colorMeshBuilder.addPolyon(intersections, Color.DARKCYAN);
for (int index = 0; index < intersections.size(); index++)
  colorMeshBuilder.addCube(0.01, intersections.get(index), Color.FIREBRICK);
origin: us.ihmc/robot-environment-awareness-visualizers

private Node createPriorityQueueGraphics(PlanarRegionSegmentationRawData rawData, ConcaveHullFactoryResult concaveHullFactoryResult)
{
 JavaFXMultiColorMeshBuilder meshBuilder = new JavaFXMultiColorMeshBuilder(new TextureColorAdaptivePalette(512));
 Point3D planeOrigin = rawData.getOrigin();
 Quaternion planeOrientation = rawData.getOrientation();
 Color regionColor = OcTreeMeshBuilder.getRegionColor(rawData.getRegionId());
 for (ConcaveHullVariables intermediateVariables : concaveHullFactoryResult.getIntermediateVariables())
 {
   PriorityQueue<Pair<QuadEdge, QuadEdgeTriangle>> queue = intermediateVariables.getSortedByLengthQueue();
   for (Pair<QuadEdge, QuadEdgeTriangle> edgeAndTriangle : queue)
   {
    QuadEdge edge = edgeAndTriangle.getLeft();
    Point3D dest = PolygonizerTools.toPointInWorld(edge.dest().getX(), edge.dest().getY(), planeOrigin, planeOrientation);
    Point3D orig = PolygonizerTools.toPointInWorld(edge.orig().getX(), edge.orig().getY(), planeOrigin, planeOrientation);
    boolean isEdgeTooLong = dest.distance(orig) > parameters.getEdgeLengthThreshold();
    Color lineColor = Color.hsb(regionColor.getHue(), regionColor.getSaturation(), isEdgeTooLong ? 0.25 : regionColor.getBrightness());
    meshBuilder.addLine(dest, orig, 0.0015, lineColor);
    QuadEdgeTriangle triangle = edgeAndTriangle.getRight();
    List<Point2D> triangleVerticesLocal = Arrays.stream(triangle.getVertices()).map(v -> new Point2D(v.getX(), v.getY())).collect(Collectors.toList());
    List<Point3D> triangleVerticesWorld = PolygonizerTools.toPointsInWorld(triangleVerticesLocal, planeOrigin, planeOrientation);
    double hue = 360.0 * random.nextDouble();
    double saturation = 0.8 * random.nextDouble() + 0.1;
    double brightness = 0.9;
    meshBuilder.addPolyon(triangleVerticesWorld, Color.hsb(hue, saturation, brightness));
   }
 }
 MeshView trianglesMeshView = new MeshView(meshBuilder.generateMesh());
 trianglesMeshView.setMaterial(meshBuilder.generateMaterial());
 return trianglesMeshView;
}
origin: us.ihmc/robot-environment-awareness-visualizers

intersectionPlaneBoxCalculator.setPlane(pointOnPlane, planeNormal);
intersectionPlaneBoxCalculator.computeIntersections(plane);
occupiedMeshBuilder.addPolyon(plane, normalBasedColor);
if (SHOW_HIT_LOCATIONS)
 occupiedMeshBuilder.addCube(0.01, pointOnPlane, DEFAULT_COLOR);
origin: us.ihmc/robot-environment-awareness-visualizers

intersectionPlaneBoxCalculator.setPlane(pointOnPlane, planeNormal);
intersectionPlaneBoxCalculator.computeIntersections(plane);
occupiedMeshBuilder.addPolyon(plane, normalBasedColor);
if (SHOW_HIT_LOCATIONS)
 occupiedMeshBuilder.addCube(0.01, pointOnPlane, DEFAULT_COLOR);
us.ihmc.javaFXToolkit.shapesJavaFXMultiColorMeshBuilderaddPolyon

Javadoc

Add a polygon to this builder. No sanity check is performed on the polygon's vertices.

Popular methods of JavaFXMultiColorMeshBuilder

  • <init>
    Creates an empty mesh builder given a texture color palette to use.
  • generateMaterial
  • generateMesh
  • addLine
    Add a 3D line to this builder.
  • addMesh
    Rotates, translates, then combines the given mesh with the mesh contained in this builder.
  • addMultiLine
    Add a series of connected 3D lines to this builder.
  • clear
    Clears the meshes contained in this builder.
  • addCone
    Add a cone to this builder. Its axis is aligned with the z-axis and its top is the vertex with the h
  • addCube
    Add a cube to this builder.
  • addCylinder
    Add a cylinder to this builder. Its axis is aligned with the z-axis in its local coordinate system.
  • addPolygon
    Add a 2D polygon to this builder.
  • addBox
    Add a box to this builder.
  • addPolygon,
  • addBox,
  • setColor,
  • addTetrahedron

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now