PathEngine home previous: iAgent::testCollisionTo()next: Interface iCollisionContext
Contents, API Reference, Interfaces, iAgent, testCollisionTo_XY

iAgent::testCollisionTo_XY()

Description

Tests whether the agent can move along a line specified in terms of target x and y coordinates.

Syntax

bool testCollisionTo_XY(const iCollisionContext* context, int32_t x, int32_t y, int32_t& cell) const;

Parameters

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.
Note that the agent is not considered to obstruct itself even if included in this context.
x X coordinate for the end of the line.
y Y coordinate for the end of the line.
cell If there is no collision then this value will be set to the cell at the end of the line.

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 line to the specified position is obstructed, otherwise false.

Remarks

If a fully specified cPosition is available for the end of the line then iAgent::testCollisionTo() should be used instead.

See The PathEngine Movement Model for details about PathEngine collision.

See Also

iMesh::testLineCollision_XY()

C# Mapping

bool testCollisionTo_XY(CollisionContext context, int x, int y, out int cell);

Java Mapping

boolean testCollisionTo_XY(CollisionContext context, int x, int y, int_OutArgument cell);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: Interface iCollisionContext