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

iAgent::testCollisionAt()

Description

Tests whether the agent can be placed at a specified position.

Syntax

bool testCollisionAt(const iCollisionContext* context, const cPosition& newPosition) const;

Parameters

context The state of dynamic collision that will apply for this query.
An empty context can be specified by passing nullptr for this argument.
Note that the agent is not considered to obstruct itself even if included in this context.
newPosition The position to test. This position must be a valid position on the agent's mesh.

Requirements

Requires that the agent is moveable and that collision preprocess has been generated on the agent's mesh for the agent's collision shape. (But see also Performing Collision Queries without Preprocess.)

Return Value

true if the specified position is obstructed, otherwise false.

Remarks

See The PathEngine Movement Model for details about PathEngine collision.

See Also

iMesh::testPointCollision()

C# Mapping

bool testCollisionAt(CollisionContext context, PathEngine.Position newPosition);

Java Mapping

boolean testCollisionAt(CollisionContext context, Position newPosition);

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