Class SoIntersectionDetectionAction
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.actions.SoAction
com.openinventor.inventor.collision.SoIntersectionDetectionAction
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Axis.static enum
Position.static enum
Types definitions.Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
enableElement
(Class<? extends Inventor> t, int stkIndex) static float
Queries epsilon (small value) to be used in the collision computation.static void
setIntersectEpsilon
(float epsilon) Sets epsilon (small value) to be used in the collision computation.Methods inherited from class com.openinventor.inventor.actions.SoAction
apply, apply, clearApplyResult, forwardTraversal, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoIntersectionDetectionAction
public SoIntersectionDetectionAction()Constructor.
-
-
Method Details
-
enableElement
-
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.
-