Contents, API Reference, Interfaces, iMesh, getAllAgentsOverlapped
Fills a buffer with the set of agents in a given context overlapped by the given shape at the given position.
void getAllAgentsOverlapped(const iShape* shape, const iCollisionContext* context, const cPosition& position, iArrayReceiver<iAgent*>& overlappedAgents) const;
The collision shape to use for this query.
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.
The position to be tested. This position must be a valid position on this mesh
(See Passing Arrays.)
Returns the set of agents overlapped by the query shape.
Note that this result set can't be larger than the number of agents in the context passed in.
Requires that unobstructed space has been generated on this mesh for the collision shape specified.
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 iAgent::setUserData() and iAgent::getUserData().)
void getAllAgentsOverlapped(Shape shape, CollisionContext context, PathEngine.Position position, out Agent overlappedAgents);
void getAllAgentsOverlapped(Shape shape, CollisionContext context, Position position, Object_OutArgument overlappedAgents);