PathEngine home previous: iMesh::testLineCollision()next: iMesh::testPointCollision()
Contents, API Reference, Interfaces, iMesh, testLineCollision_XY



Tests whether agents with the given collision shape can move along the specified line without being obstructed. This version does not require the end of the line to be fully specified.


bool testLineCollision_XY(const iShape* shape, const iCollisionContext* context, const cPosition& start, int32_t x, int32_t y, int32_t& cell) const;


shape The collision shape to use for this query.
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.
start The start of the line. This position must be a valid position on this mesh
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.


Requires that unobstructed space has been generated on this mesh for the collision shape specified.
(But see also Performing Collision Queries without Preprocess.)

Return Value

true if movement along the line is obstructed for an agent with the specified shape and given the specified state of dynamic collision, otherwise false.


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

See The PathEngine Movement Model for details about PathEngine collision.

See Also

iMesh::testLineCollision(), iMesh::firstCollision()

C# Mapping

bool testLineCollision_XY(Shape shape, CollisionContext context, PathEngine.Position start, int x, int y, out int cell);

Java Mapping

boolean testLineCollision_XY(Shape shape, CollisionContext context, Position start, int x, int y, int_OutArgument cell);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iMesh::testPointCollision()