PathEngine home previous: iShape::vertex()next: iMesh::addAnchorsAndShapes()
Contents, API Reference, Interfaces, iMesh

Interface iMesh

Description

iMesh objects correspond to ground surfaces ('meshes') on which agents can move.

Defined in SDKRoot/code/externalAPI/i_pathengine.h.

(See Ground Meshes.) The iMesh interface controls preprocess generation for this ground surface, the placement of agents on this ground surface, and creation of collision contexts for those agents. This interface also provides queries about possibilities for movement on this mesh.

Construction and Deletion

iMesh objects can be constructed with iPathEngine::loadMeshFromBuffer(). iMesh objects can be released explicitly by calling delete on the pointer or by calling the object's release() function. A pointer to an iMesh object must not be used after the object has been deleted.

Methods:

addAnchorsAndShapes

Adds a set of anchors and shapes, represented in the form of an object derived from the Interface iAnchorsAndPinnedShapes interface class, to this mesh.

addEndPoint

Adds an endpoint for use with the off-mesh connections feature.

addExternalRef

Increments the internal reference count for this API object.

addOffMeshConnection

Tells PathEngine about the possibility for agents to move 'off-mesh' between a pair of endpoints.

autoGenerateConnections

Enables automatic generation of off-mesh connections based on the generation of sample points around the mesh edge and a callback object that determines whether connection is possible for a given pair of sample points.

burnContextIntoMesh

Adds boundaries corresponding to the set of obstacles in a context to the mesh's base circuits.

calculatePathfindingCostForLine

Calculates the movement cost for a given line, as applied during pathfinding.

clearAllAnchors

Clears all anchors currently stored on this mesh.

clearAllNamedObstacles

Removes any named obstacles stored on this mesh.

clearOffMeshConnectionsAndEndPoints

Removes any off-mesh connections or off-mesh connection endpoints associated with a mesh.

constructPath

Provided to enable Interface iPath objects to be constructed directly from a sequence of positions.

copyPath

Creates a copy of a path object.

findClosestUnobstructedPosition

Finds the closest unobstructed position, if one exists within a specified region around a given position.

findClosestUnobstructedPositionEx

Finds the closest unobstructed position to a specified target, within a specified query range and within local mesh as defined by a set of supplied root positions, if one exists (with an optional connectivity constraint based on connected regions preprocess).

findPathAway

Finds the shortest path of escape from a specified region from a given start position.

findPathAway_WithQueryCallBack

Finds the shortest path of escape from a specified region from a given start position.
(This version supports passing in a callback object to enable the query to be aborted early.)

findShortestPath

Finds the shortest path from a given start position to a given end position for agents with a specified collision shape.

findShortestPath6

Finds the shortest path from a given start position to a given end position for agents with a specified collision shape.

findShortestPath_MultipleStartPositions

Finds the shortest path from a given set of start positions to a given end position for agents with a specified collision shape.

findShortestPath_WithQueryCallBack

Finds the shortest path from a given start position to a given end position for agents with a specified collision shape.
(This version supports passing in a callback object to enable the query to be aborted early.)

firstCollision

Determines the first contact, if any, for an agent with the specified collision shape moving along the specified line.

generateConnectedRegionPreprocessFor

Generates preprocess data relating to connectivity between unobstructed space boundaries, to support connected region queries.

generateCurvedPath

Post process path smoothing.
Returns a new path based on a 'base path', but with corners smoothed according to supplied parameters.

generateCurvedPath_WithEndVector

Post process path smoothing.
Returns a new path based on a 'base path', but with corners smoothed according to supplied parameters.

generatePathfindPreprocess6For

Generates (release 6 type) preprocess data for pathfinding around agent unobstructed space.

generatePathfindPreprocessFor

Generates preprocess data for pathfinding around agent unobstructed space.

generateRandomPosition

Generates a random position on the surface of this mesh.

generateRandomPositionInSection

Generates a random position in the specified section.

generateRandomPositionLocally

Generates a random position on the region of a mesh local to the specified centre position.

generateUnobstructedSpaceFor

Generates a representation of (expanded) unobstructed space boundaries for the specified agent shape, on this mesh.

generateUnobstructedSpaceFor_WithPreExpanded

Generates a representation of (expanded) unobstructed space boundaries for the specified agent shape, on this mesh.

get3DFaceAtPosition

A helper function for obtaining information about the 3D mesh under a position.

get3DFaceAttribute

Used to query ground attributes.

get3DFaceConnection

Helper function providing access to the geometry of the underlying 3D mesh.

get3DFaceNormal

Returns a normal vector for a face in the underlying 3d mesh.

get3DFaceVertex

Helper function providing access to the geometry of the underlying 3D mesh.

get3DFaceVertexIndexInMesh

Helper function providing access to the geometry of the underlying 3D mesh.

getAllAgentsOverlapped

Fills a buffer with the set of agents in a given context overlapped by the given shape at the given position.

getBurntInObstacleRoot

Returns the root position for the specified burnt in obstacle, or an explicitly invalid position (position with cell set to -1) in the case of a 2D obstacle.

getBurntInObstacleVertex

Returns the coordinates of the specified burnt in obstacle vertex.

getBurntInObstacleVertices

Returns the number of vertices in the burnt in obstacle at the given index.

getCellForEndOfLine

Traverses along the surface of a ground mesh to disambiguate overlapping geometry at a target point.

getConnectedRegionFor

Returns an index for the connected region at a given position. This can be used to quickly determine the reachability between positions.

getConnectedRegionForAgent

Returns an index for the connected region for an agent's current position.

getEndPoint

Helper function for retrieving the positions for off-mesh connection endpoints stored with a mesh.

getFederationTileIndex

Helper method to obtain the mesh federation tile index.

getNumberOf3DFaces

Helper function providing access to the geometry of the underlying 3D mesh.

getNumberOfAnchors

Returns the number of anchors stored with this mesh.

getNumberOfBurntInObstacles

Enables iteration through the set of obstacles burnt into a mesh.

getNumberOfConnectedRegions

Returns the number of distinct regions in connected region preprocess for the specified shape.

getNumberOfEndPoints

Helper function returning the number of off-mesh connection endpoints stored with a mesh.

getNumberOfNamedObstacles

Returns the number of fixed obstacles stored with this mesh.

getNumberOfOffMeshConnections

Helper function returning the number of off-mesh connections stored with a mesh.

getNumberOfSections

Helper function returning the number of sections present in the underlying 3D mesh.

getOffMeshConnectionInfo

Helper function for retrieving information about off-mesh connections stored with a mesh.

getOrigin

Helper for querying local origin of mesh, e.g. for mesh federation tiles.

getSectionID

Returns the section ID for a given position.

getSurfaceType

Queries for the surface type value associated with the given position on a ground mesh.

hasRefs

Enables you to check whether there are any outstanding references on this object, other than the interface reference through which you are calling, and therefore whether this object will actually be deleted if you call it's release method.

heightAtPosition

Provides the height for a position on the surface of this ground mesh.

heightAtPositionF

Provides the height for a position on the surface of this ground mesh (as a float).

heightAtPositionWithPrecision

Provides the height for a position on the surface of this ground mesh as a float, taking account of the precision components of the position supplied.

loadConnectedRegionPreprocessFor

Loads connected region preprocess from persistent storage.

loadPath

Loads internal data relating to a path from persistent storage.

loadPathfindPreprocessFor

Loads pathfind preprocess from persistent storage.

loadUnobstructedSpaceFor

Loads unobstructed space from persistent storage.

newContext

Creates an Interface iCollisionContext to representing a state of dynamic collision for this mesh.

newObstacleSet

Creates a free standing obstacle set.

newObstacleSet_WithAttributes

Creates a free standing obstacle set.

placeAgent

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

placeLargeStatic2DObstacle

Constructs an Interface iAgent object to represent placement of an obstacle on this mesh.
This version doesn't require a root position, with the obstacle then applying to all ground layers overlapping the obstacle horizontally.

placeLargeStaticObstacle

Constructs an Interface iAgent object to represent placement of an obstacle on this mesh.
This version enables shapes to be placed without the application of the usual range constraint on iShape instances.

placeProjected3DObstruction

Constructs an Interface iAgent object to represent the way in which a piece of 3D geometry obstructs a specified ground layer.

pointIsIn3DFace

Helper method for testing whether horizontal coordinates are inside a 3D face.

positionFor3DPoint

Enables you to obtain a position on a mesh underneath a point in 3D space.

positionFor3DPoint_ExcludeTerrain

Used for resolving anchor positions in the case where the anchor should not resolve to 'terrain stand-in' geometry.

positionForPointIn3DFace

Helper for constructing a cPosition from horizontal coordinates and 3D face index.

positionInSection

Obtains a position in the specified section and at the given coordinates, if such a position exists.

positionInSectionFor3DPoint

Variation on iMesh::positionFor3DPoint() enabling the resulting position to be restricted to a specified section.

positionInSectionInShape

Attempts to find a cPosition that is both within the specified section and also inside the supplied polygon.

positionInSectionNear3DPoint

Variation on iMesh::positionNear3DPoint() enabling the resulting position to be restricted to a specified section.

positionIsBlockedBySurfaceTypeTraverseCosts

Checks whether a position has been marked as blocked through the surface type traverse costs mechanism.

positionIsValid

Returns whether or not the specified position is a valid position on this mesh.

positionNear3DPoint

Enables you to resolve a position in 3d space to a nearby position on the surface of this ground mesh.

preprocessGenerationCompleted

Tells PathEngine that it is ok to discard any data associated with this mesh that is only required for generating unobstructed space or preprocess.

release

Releases the API object pointer.

releaseConnectedRegionPreprocessFor

Releases connected region preprocess previously generated by generateConnectedRegionPreprocessFor().

releasePathfindPreprocessFor

Releases pathfind preprocess previously generated by generatePathfindPreprocessFor().

releaseUnobstructedSpaceFor

Releases unobstructed space previously generated by generateUnobstructedSpaceFor().

renderAgentExpansion

A helper method for drawing the (expanded) unobstructed space boundaries for a pathfinding obstacle.

renderBaseObstacles

A helper method for drawing the boundaries for any base obstacles placed on this mesh.

renderLineOnGround

A helper method for drawing lines that hug the surface of the 3D ground mesh.

renderObstacleSetUnobstructedSpace

A helper method for drawing unobstructed space boundary lines.

renderRangeBounds

A helper method for visualising horizontal range boundaries.

renderRangeBounds_Local

A helper method for visualising horizontal range boundaries.

renderSplitBoundaries

A helper method for visual confirmation of boundaries split off for pathfind space optimisation.

renderUnobstructedSpaceBoundaries

A helper method for drawing unobstructed space boundary lines.

renderUnsplitBoundaries

A helper method for visual confirmation of boundaries split off for pathfind space optimisation.

resolvePositionsNear3DPoint

Extended position resolution method that can return multiple positions when more than one piece of ground mesh is local to the query point, and also supports filtering by sectionID if this is desired.

retrieveAnchor

Retrieve named positions stored with this mesh.

retrieveAnchorByIndex

Used for iterating through anchors.

retrieveNamedObstacle

Construct an agent from obstacle information stored with the mesh.

retrieveNamedObstacleByIndex

Used for iterating through fixed obstacles.

reversePath

Creates a reversed copy of a path.

saveConnectedRegionPreprocessFor

Saves connected region preprocess to persistent storage.

saveGround

Saves the underlying ground for this iMesh (backward compatibility version).

saveGroundEx

Saves the underlying ground for this iMesh.

savePath

Saves internal data relating to a path to persistent storage.

savePathfindPreprocessFor

Saves pathfind preprocess to persistent storage.

saveUnobstructedSpaceFor

Saves unobstructed space to persistent storage.

setTerrainCallBack

Supplies a callback object to be used by PathEngine for looking up height detail at points in the specified terrain layer on this mesh.

shapeCanCollide

A helper function for checking whether unobstructed space is present for a given shape.

shapeCanPathfind

A helper function for checking whether pathfinding queries are supported for a given shape (and collision context).

shapeHasCombinedUnobstructedSpace

A helper function for checking whether combined unobstructed space is present for a given shape.

shapeHasConnectedRegionPreprocess

A helper function for checking whether connected region preprocess is present for a given shape.

shapeHasPathfind6Preprocess

A helper function for checking whether pathfinding queries are supported (with release 6 preprocess type) for a given shape (and collision context).

storeAnchor

Intended for use when building content. Associates a position and orientation with a string ID.

storeNamedObstacle

Intended for use when building content. Places an obstacle that can later be retrieved as an agent.

testLineCollision

Tests whether agents with the given collision shape can move along the specified line without being obstructed.

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.

testPointCollision

Tests whether the specified position is obstructed for agents with the given collision shape.


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