dSpaceCollide2

@brief Determines which geoms from one space may potentially intersect with geoms from another space, and calls the callback function for each candidate pair.

@param space1 The first space to test.

@param space2 The second space to test.

@param data Passed from dSpaceCollide directly to the callback function. Its meaning is user defined. The o1 and o2 arguments are the geoms that may be near each other.

@param callback A callback function is of type @ref dNearCallback.

@remarks This function can also test a single non-space geom against a space. This function is useful when there is a collision hierarchy, i.e. when there are spaces that contain other spaces.

@remarks Other spaces that are contained within the colliding space are not treated specially, i.e. they are not recursed into. The callback function may be passed these contained spaces as one or both geom arguments.

@remarks Sublevel value of space affects how the spaces are iterated. Both spaces are recursed only if their sublevels match. Otherwise, only the space with greater sublevel is recursed and the one with lesser sublevel is used as a geom itself.

@remarks dSpaceCollide2() is guaranteed to pass all intersecting geom pairs to the callback function, but may also pass close but non-intersecting pairs. The number of these calls depends on the internal algorithms used by the space. Thus you should not expect that dCollide will return contacts for every pair passed to the callback.

@sa dSpaceCollide @sa dSpaceSetSublevel @ingroup collide

extern (C) nothrow
void
dSpaceCollide2

Meta