|PathEngine home||previous: ||next: |
Determines the first contact, if any, for movement by the agent along a line to a specified target position.
bool firstCollisionTo(const iCollisionContext* context, int32_t x, int32_t y, int32_t& cell, cCollidingLine& collidingLine, iAgent*& agent) const;
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.|
|collidingLine||If there is a collision then this will be filled in to describe a line of first contact.|
|agent||If there is a collision, and first contact is with an agent in the supplied collision context, this returns a pointer to the obstructing agent. If there is no collision, this is set to zero.|
The start position passed into this query should not be obstructed.
In the case of a collision, the line of contact is guaranteed to cross the direction of travel from right to left, but note the start and end points of this line of contact serve only to describe the position and direction of the 'infinite line' at point of collision, and should not be considered as meaningful in of themselves.
bool firstCollisionTo(CollisionContext context, int x, int y, out int cell, out PathEngine.CollidingLine collidingLine, out Agent agent);
boolean firstCollisionTo(CollisionContext context, int x, int y, int_OutArgument cell, Object_OutArgument collidingLine, Object_OutArgument agent);
|Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEngine||next: |