PathEngine home previous: iAgent::testCollisionAt()next: iAgent::testCollisionTo()
Contents, API Reference, Interfaces, iAgent, testCollisionDirectlyAgainstPlacedShape



Tests whether a specified shape at a specified position will obstruct the agent.


bool testCollisionDirectlyAgainstPlacedShape(const iShape* shape, const cPosition& shapePosition) const;


shape The shape for against which to test collision.
shapePosition The position for that shape. This position must be a valid position on the agent's mesh.


Requires that that the agent is moveable and that collision preprocess has been generated on the agent's mesh for the agent's collision shape.

Assumes that this agent is not in collision with the external edges of the mesh.
If this method is called with an agent that is in collision with the external edges of the mesh then the return value is undefined.

Return Value

true if this agent collides with the specified shape at the specified position, otherwise false.


See The PathEngine Movement Model for details about PathEngine collision.

C# Mapping

bool testCollisionDirectlyAgainstPlacedShape(Shape shape, PathEngine.Position shapePosition);

Java Mapping

boolean testCollisionDirectlyAgainstPlacedShape(Shape shape, Position shapePosition);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iAgent::testCollisionTo()