maspack.collision
Class SurfaceMeshContourIxer

java.lang.Object
  extended by maspack.collision.SurfaceMeshContourIxer

public class SurfaceMeshContourIxer
extends java.lang.Object

An intersector which produces contours, similar to AJL's code. This class will find intersection contours between two PolygonalMeshes. First, their bounding volume hierarchies are tested for collisions in order to create a map of Face-Face intersections. An unordered list of all intersection points (MeshIntersectionPoints) is generated from all Face-Face intersections. Finally, MIPs are processed to generate one or more MeshIntersectionContours, each of which contains a single list of ordered MIPs, which may be open or closed.

Author:
andrew

Nested Class Summary
static class SurfaceMeshContourIxer.DegenerateCaseException
           
static class SurfaceMeshContourIxer.EdgeFacePair
          Static Inner Class for holding an Edge-Face pair.
 
Field Summary
 PolygonalMesh mesh0
           
 PolygonalMesh mesh1
           
static long renderTime
           
 
Constructor Summary
SurfaceMeshContourIxer()
           
 
Method Summary
 boolean findContours(PolygonalMesh mesh0, PolygonalMesh mesh1)
           
 java.util.List<IntersectionContour> getContours()
           
 void setHandleDegen(boolean handle)
          Call this method to change how this class handles degenerate intersection cases that it detects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mesh0

public PolygonalMesh mesh0

mesh1

public PolygonalMesh mesh1

renderTime

public static long renderTime
Constructor Detail

SurfaceMeshContourIxer

public SurfaceMeshContourIxer()
Method Detail

setHandleDegen

public void setHandleDegen(boolean handle)
Call this method to change how this class handles degenerate intersection cases that it detects. By default, it is true. If true, upon detection of a degenerate case, vertices of the two faces in question will be perturbed slightly, and the intersection code will attempt to run again, until all degenerate cases are resolved. This behaviour might be undesirable, and in this case, you can call setHandleDegen(false) to disable it

Parameters:
handle - true if degenerate cases should be handled by perturbation, false otherwise.

getContours

public java.util.List<IntersectionContour> getContours()

findContours

public boolean findContours(PolygonalMesh mesh0,
                            PolygonalMesh mesh1)