| PathEngine home | previous: | next: |
Fills a buffer with the set of agents in a given context overlapped by the given shape at the given position.
void getAllAgentsOverlapped(iShape* shape, const iCollisionContext* context, const cPosition& position, iAgent** resultsBuffer, tSigned32& numberOverlapped) const; |
| shape | The collision shape to use for this query. | ||
| context |
The state of dynamic collision that will apply for this query. An empty context can be specified by passing a value of zero for this argument. | ||
| position | The position to be tested. This position must be a valid position on this mesh | ||
| resultsBuffer | A pointer to a buffer to be filled with the results of the query. The buffer must be large enough to hold the maximum number of agents that could potentially be returned by the query. | ||
| numberOverlapped | Returns the number of agents overlapped. |
This query is useful for implementing logic depending on collision between agents,
in the case where the agents don't need to actually impede each other's movement.
For example the context passed in may contain a set of floor switches in the world.
Once you have the set of overlapped agents a common technique is to use the 'user data'
stored with those agents to trigger any relevant consequences.
(See
The simplest way to guarantee that the results buffer is large enough for the set of overlapped
agents is to allocate a buffer the size of the context passed in.
| Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEngine | next: |