Class 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:
    SoCollisionManager, SoWinCollisionViewer
    • Constructor Detail

      • SoIntersectionDetectionAction

        public SoIntersectionDetectionAction()
    • Method Detail

      • enableElement

        public static void enableElement​(java.lang.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.