Class SoIntersectionDetectionAction

java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.actions.SoAction
com.openinventor.inventor.collision.SoIntersectionDetectionAction

public class SoIntersectionDetectionAction extends SoAction
Class to detect intersections. This action allows the programmer to analyze a scene graph to know which pairs of objects within the scene intersect.

The action first detects intersections between pairs of bounding boxes. If such an intersection occurs, the programmer can abort the action or allow it to determine if the primitives of the objects actually collide.

The algorithm can call programmer-supplied callbacks when there is an intersection between two objects.

See Also:
  • Constructor Details

    • SoIntersectionDetectionAction

      public SoIntersectionDetectionAction()
      Constructor.
  • Method Details

    • enableElement

      public static void enableElement(Class<? extends Inventor> t, int stkIndex)
    • setIntersectEpsilon

      public static void setIntersectEpsilon(float epsilon)
      Sets epsilon (small value) to be used in the collision computation. If the distance between two objects is less than epsilon, the objects are considered to have collided.
    • getIntersectEpsilon

      public static float getIntersectEpsilon()
      Queries epsilon (small value) to be used in the collision computation.