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/include/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 deleted explicitly by calling delete on the pointer or by calling the object's destroy() function. All iMesh objects are deleted by a call to iPathEngine::deleteAllObjects(). A pointer to an iMesh object must not be used after the object has been deleted. Any meshes not deleted get cleaned up automatically when pathengine is shut down.

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.

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.

buildCollideAndSlidePath

Builds a path for movement in the specified direction through direct collision tests with sliding against any obstructions encountered.

burnContextIntoMesh

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

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.

constructPath_Reversed

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

findClosestUnobstructedPosition

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

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.

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.

generateCollisionPreprocessFor

Generates preprocess to support collision queries relating to movement for the specified shape on this mesh.

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.

generatePathfindPreprocessFor

Generates preprocess to support pathfinding queries about movement for the specified shape on this mesh.

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.

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.

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.

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.

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 connected regions in the unobstructed space for a given 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.

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.

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.

loadCollisionPreprocessFor

Loads collision preprocess from persistent storage.

loadPath

Loads internal data relating to a path from persistent storage.

loadPathfindPreprocessFor

Loads pathfinding preprocess 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.

placeLargeStaticObstacle

Constructs an Interface iAgent object to represent placement of an object of a given shape at a point on the surface of this mesh.
This version enables shapes to be placed without the application of the usual range constraint on iShape instances.

positionFor3DPoint

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

positionFor3DPointF

Variation on iMesh::positionFor3DPoint() with the point specified in floating point coordinates.

positionFor3DPoint_ExcludeTerrain

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

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.

positionInSectionFor3DPointF

Variation on iMesh::positionInSectionFor3DPoint() with the point specified in floating point coordinates.

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 preprocess.

releaseAllPreprocessFor

Releases preprocess previously generated by generateCollisionPreprocessFor() or by generatePathfindPreprocessFor().

releasePathfindPreprocessFor

Releases preprocess previously generated by generatePathfindPreprocessFor().

renderLineOnGround

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

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.

saveCollisionPreprocessFor

Saves collision preprocess to persistent storage.

saveGround

Saves the underlying ground for this iMesh.

savePath

Saves internal data relating to a path to persistent storage.

savePathfindPreprocessFor

Saves pathfinding preprocess 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 collision preprocess is present for a given shape.

shapeCanPathfind

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

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 5.18 - Copyright © 2002-2008 PathEnginenext: iMesh::addAnchorsAndShapes()