SoIntersectionDetectionAction Class Reference
[ActionsCollision]

VSG extension Class to detect intersections. More...

#include <Inventor/collision/SoIntersectionDetectionAction.h>

Inheritance diagram for SoIntersectionDetectionAction:
SoAction SoTypedObject

List of all members.

Public Types

enum  Resp {
  NEXT_PRIMITIVE,
  NEXT_SHAPE,
  ABORT
}
enum  Axis {
  X_AXIS = 1,
  Y_AXIS = 2,
  Z_AXIS = 4
}
enum  Position {
  BEGIN,
  END
}
typedef Resp SoIntersectionCB (void *userData, const SoIntersectingPrimitive *, const SoIntersectingPrimitive *)

Public Member Functions

virtual SoType getTypeId () const
 SoIntersectionDetectionAction ()
 ~SoIntersectionDetectionAction ()
void apply (SoNode *node)
void apply (SoPath *path)
void apply (const SoPathList &pathList, SbBool obeysRules=FALSE)
void setFilterCallback (SoIntersectionFilterCB *newFilterCB, void *data=NULL)
void addIntersectionCallback (SoIntersectionCB *f, void *userData=NULL)
void removeIntersectionCallback (SoIntersectionCB *f, void *userData=NULL)

Static Public Member Functions

static SoType getClassTypeId ()

Friends

class SoCollisionManager

Deprecated



static SoDEPRECATED void setIntersectEpsilon (float epsilon)
static SoDEPRECATED float getIntersectEpsilon ()

Detailed Description

VSG extension 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

See related examples:

Intersections


Member Typedef Documentation


Member Enumeration Documentation

Axis.

Enumerator:
X_AXIS 

X.

Y_AXIS 

Y.

Z_AXIS 

Z.

Position.

Enumerator:
BEGIN 

Begin.

END 

End.

Types definitions.

Enumerator:
NEXT_PRIMITIVE 

Next primitive.

NEXT_SHAPE 

Next shape.

ABORT 

Abort.


Constructor & Destructor Documentation

SoIntersectionDetectionAction::SoIntersectionDetectionAction (  ) 

Constructor.

SoIntersectionDetectionAction::~SoIntersectionDetectionAction (  ) 

Destructor.


Member Function Documentation

void SoIntersectionDetectionAction::addIntersectionCallback ( SoIntersectionCB f,
void *  userData = NULL 
)

Adds a callback to be called when there is an intersection.

void SoIntersectionDetectionAction::apply ( const SoPathList pathList,
SbBool  obeysRules = FALSE 
) [virtual]

Initiates an action on the graph defined by a list of paths.

TRUE can be passed for the obeysRules flag if the given path list has the following 4 properties:

  1. All paths have the same head node.
  2. Paths are sorted in traversal order.
  3. If one path ends at node A, no other path continues through A.
  4. No two paths are the same.

These rules will be obeyed by path lists returned by picking and by searches for non-group nodes.

Reimplemented from SoAction.

void SoIntersectionDetectionAction::apply ( SoPath path  )  [virtual]

Initiates an action on the graph defined by a path.

Warning: Most actions call ref() on the path before traversing the scene graph, then call unref() after traversal. If the path's reference count was zero (the default), the call to apply() will cause it to be destroyed.

Reimplemented from SoAction.

void SoIntersectionDetectionAction::apply ( SoNode node  )  [virtual]

Initiates an action on the graph defined by a node.

Warning: Most actions call ref() on the node before traversing the scene graph, then call unref() after traversal. If the node's reference count was zero (the default), the call to apply() will cause it to be destroyed.

Reimplemented from SoAction.

static SoType SoIntersectionDetectionAction::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoAction.

static SoDEPRECATED float SoIntersectionDetectionAction::getIntersectEpsilon (  )  [static]

Queries epsilon (small value) to be used in the collision computation.

Deprecated:

Deprecated since Open Inventor 4000
No longer used.
virtual SoType SoIntersectionDetectionAction::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Implements SoTypedObject.

void SoIntersectionDetectionAction::removeIntersectionCallback ( SoIntersectionCB f,
void *  userData = NULL 
)

Removes a callback to be called when there is an intersection.

void SoIntersectionDetectionAction::setFilterCallback ( SoIntersectionFilterCB newFilterCB,
void *  data = NULL 
)

Sets a filter which allow the user to continue or not the intersection finding for a pair of shapes.

If the callback returns TRUE, the action search for real intersections, else it goes to the next shape pair.

static SoDEPRECATED void SoIntersectionDetectionAction::setIntersectEpsilon ( float  epsilon  )  [static]

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.

Deprecated:

Deprecated since Open Inventor 4000
No longer used.

Friends And Related Function Documentation

friend class SoCollisionManager [friend]

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/