PathEngine home previous: iMesh::newObstacleSet_WithAttributes()next: iMesh::placeLargeStatic2DObstacle()
Contents, API Reference, Interfaces, iMesh, placeAgent

iMesh::placeAgent()

Description

Constructs an Interface iAgent object to represent placement of an object of a given shape at a point on the surface of this mesh.

Syntax

iAgent* placeAgent(const iShape* shape, const cPosition& position) const;

Parameters

shape The shape of the agent. This shape determines how the agent will collide.
position Where to place the agent.
This must be a valid position on this mesh.

Return Value

A newly created Interface iAgent.

Remarks

When an iAgent object is going to be used purely as an obstruction (i.e. the agent will not subsequently be moved, and no collision or pathfinding queries are going to be made through the agent), consider using iMesh::placeLargeStaticObstacle() instead, as this avoids the need to construct an iShape object and bypasses query related range constraints.

The created Interface iAgent can be explicitly deleted when no longer required, but will also be deleted when this mesh is released.

Some discussion of PathEngine's runtime shape management functionality, in general, can be found here.

See Also

iMesh::placeProjected3DObstruction()

C# Mapping

Agent placeAgent(Shape shape, PathEngine.Position position);

Java Mapping

Agent placeAgent(Shape shape, Position position);

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