Tao.Ode SDK Documentation

Ode.dSpaceCollide Method 

This determines which pairs of geoms in a space may potentially intersect, and calls the callback function with each candidate pair. The callback function is of type dNearCallback, which is defined as: typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); The data argument is 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. The callback function can call dCollide on o1 and o2 to generate contact points between each pair. Then these contact points may be added to the simulation as contact joints. The user's callback function can of course chose not to call dCollide for any pair, e.g. if the user decides that those pairs should not interact. 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. dSpaceCollide() is guaranteed to pass all intersecting geom pairs to the callback function, but it may also make mistakes and pass non-intersecting pairs. The number of mistaken 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.

[Visual Basic]
Public Shared Sub dSpaceCollide( _
   ByVal space As IntPtr, _
   ByVal data As IntPtr, _
   ByVal callback As dNearCallback _
)
[C#]
public static void dSpaceCollide(
   IntPtr space,
   IntPtr data,
   dNearCallback callback
);

Parameters

space
A dSpaceID
data
An IntPtr
callback
A dNearCallback

See Also

Ode Class | Tao.Ode Namespace