Tabnine Logo
ConcaveHullDecomposition
Code IndexAdd Tabnine to your IDE (free)

How to use
ConcaveHullDecomposition
in
us.ihmc.robotEnvironmentAwareness.geometry

Best Java code snippets using us.ihmc.robotEnvironmentAwareness.geometry.ConcaveHullDecomposition (Showing top 8 results out of 315)

origin: us.ihmc/robot-environment-awareness

/**
* Inspired from the SL-decomposition in the paper 
* <a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjZlOab96XPAhXBQD4KHcXeB4MQFggsMAE&url=https%3A%2F%2Fparasol.tamu.edu%2Fpublications%2Fdownload.php%3Ffile_id%3D390&usg=AFQjCNF3wXvuCxXNREhu4CW-oNyd1caa0A&sig2=X-zxaHykED7EuqkYhkfUgg">
*  Approximate Convex Decomposition of Polygons</a>.
*  @param concaveHullCollection [input] the collection of concave hulls to be decomposed into convex polygons.
*  @param depthThreshold [input] the algorithm determines whether the polygon is to split or not by looking at the maximum depth of concave pockets in the concave hull.
*  When a pocket is deeper than {@code depthThreshold} the concave hull will be split in two.
*  Otherwise, the pocket vertices will be removed.
*  @param convexPolygonsToPack [output] the convex polygons approximating the concave hull.
*/
public static void recursiveApproximateDecomposition(ConcaveHullCollection concaveHullCollection, double depthThreshold, List<ConvexPolygon2D> convexPolygonsToPack)
{
 for (ConcaveHull concaveHull : concaveHullCollection)
   recursiveApproximateDecomposition(concaveHull.getConcaveHullVertices(), depthThreshold, convexPolygonsToPack);
}
origin: us.ihmc/robot-environment-awareness

/**
* Inspired from the SL-decomposition in the paper 
* <a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjZlOab96XPAhXBQD4KHcXeB4MQFggsMAE&url=https%3A%2F%2Fparasol.tamu.edu%2Fpublications%2Fdownload.php%3Ffile_id%3D390&usg=AFQjCNF3wXvuCxXNREhu4CW-oNyd1caa0A&sig2=X-zxaHykED7EuqkYhkfUgg">
*  Approximate Convex Decomposition of Polygons</a>.
*  @param concaveHullVertices [input] the concave hull to be decomposed into convex polygons.
*  @param depthThreshold [input] the algorithm determines whether the polygon is to split or not by looking at the maximum depth of concave pockets in the concave hull.
*  When a pocket is deeper than {@code depthThreshold} the concave hull will be split in two.
*  Otherwise, the pocket vertices will be removed.
*  @param convexPolygonsToPack [output] the convex polygons approximating the concave hull.
*/
public static void recursiveApproximateDecomposition(List<? extends Point2DReadOnly> concaveHullVertices, double depthThreshold, List<ConvexPolygon2D> convexPolygonsToPack)
{
 recursiveApproximateDecompositionInternal(new ArrayList<>(concaveHullVertices), depthThreshold, convexPolygonsToPack);
}
origin: us.ihmc/robot-environment-awareness

/**
* Inspired from the SL-decomposition in the paper 
* <a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjZlOab96XPAhXBQD4KHcXeB4MQFggsMAE&url=https%3A%2F%2Fparasol.tamu.edu%2Fpublications%2Fdownload.php%3Ffile_id%3D390&usg=AFQjCNF3wXvuCxXNREhu4CW-oNyd1caa0A&sig2=X-zxaHykED7EuqkYhkfUgg">
*  Approximate Convex Decomposition of Polygons</a>.
*  @param concaveHull [input] the concave hull to be decomposed into convex polygons.
*  @param depthThreshold [input] the algorithm determines whether the polygon is to split or not by looking at the maximum depth of concave pockets in the concave hull.
*  When a pocket is deeper than {@code depthThreshold} the concave hull will be split in two.
*  Otherwise, the pocket vertices will be removed.
*  @param convexPolygonsToPack [output] the convex polygons approximating the concave hull.
*/
public static void recursiveApproximateDecomposition(ConcaveHull concaveHull, double depthThreshold, List<ConvexPolygon2D> convexPolygonsToPack)
{
 recursiveApproximateDecomposition(concaveHull.getConcaveHullVertices(), depthThreshold, convexPolygonsToPack);
}
origin: us.ihmc/robot-environment-awareness-visualizers

private Node createConvexDecompositionGraphics(PlanarRegionSegmentationRawData rawData,
                       ConcaveHullFactoryResult concaveHullFactoryResult)
{
 ConcaveHullCollection concaveHullCollection = concaveHullFactoryResult.getConcaveHullCollection();
 double depthThreshold = polygonizerParameters.getDepthThreshold();
 List<ConvexPolygon2D> convexPolygons = new ArrayList<>();
 ConcaveHullDecomposition.recursiveApproximateDecomposition(concaveHullCollection, depthThreshold, convexPolygons);
 JavaFXMultiColorMeshBuilder meshBuilder = new JavaFXMultiColorMeshBuilder(new TextureColorAdaptivePalette(64));
 int regionId = rawData.getRegionId();
 RigidBodyTransform rigidBodyTransform = rawData.getTransformFromLocalToWorld();
 Color regionColor = OcTreeMeshBuilder.getRegionColor(regionId);
 for (int i = 0; i < convexPolygons.size(); i++)
 {
   ConvexPolygon2D convexPolygon = convexPolygons.get(i);
   Color color = Color.hsb(regionColor.getHue(), 0.9, 0.5 + 0.5 * ((double) i / (double) convexPolygons.size()));
   meshBuilder.addPolygon(rigidBodyTransform, convexPolygon, color);
 }
 MeshView meshView = new MeshView(meshBuilder.generateMesh());
 meshView.setMaterial(meshBuilder.generateMaterial());
 return meshView;
}
origin: us.ihmc/robot-environment-awareness

ConcaveHullDecomposition.recursiveApproximateDecomposition(concaveHull, depthThreshold, decomposedPolygons);
origin: us.ihmc/ihmc-path-planning

.recursiveApproximateDecomposition(new ArrayList<>(truncatedConcaveHullVertices), depthThresholdForConvexDecomposition, truncatedConvexPolygons);
origin: us.ihmc/robot-environment-awareness

recursiveApproximateDecomposition(p1, depthThreshold, convexPolygonsToPack);
recursiveApproximateDecomposition(p2, depthThreshold, convexPolygonsToPack);
origin: us.ihmc/ihmc-path-planning-test

double depthThreshold = 0.05;
List<ConvexPolygon2D> convexPolygons = new ArrayList<>();
ConcaveHullDecomposition.recursiveApproximateDecomposition(concaveHullVertices, depthThreshold, convexPolygons);
us.ihmc.robotEnvironmentAwareness.geometryConcaveHullDecomposition

Most used methods

  • recursiveApproximateDecomposition
    Inspired from the SL-decomposition in the paper Approximate Convex Decomposition of Polygons [https:
  • recursiveApproximateDecompositionInternal

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JList (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now