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

iAgent::testCollisionDirectlyAgainstPlacedShape()

Description

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

Syntax

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

Parameters

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.

Requirements

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.

Remarks

See The PathEngine Movement Model for details about PathEngine collision.

C# Mapping

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

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iAgent::testCollisionTo()