PathEngine home previous: iMesh::addOffMeshConnection()next: iMesh::burnContextIntoMesh()
Contents, API Reference, Interfaces, iMesh, autoGenerateConnections

iMesh::autoGenerateConnections()

Description

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.

Syntax

void autoGenerateConnections(int32_t sampleSpacing, int32_t localityConstraint, int32_t horizontalRange, int32_t verticalRange, int32_t dropRange, iConnectionTestCallBack& callBack);

Parameters

sampleSpacing The distance to allow between the set of sample points that will be generated around the edge of the mesh.
localityConstraint The number of samples points to step past around the mesh edge before starting to consider connections.
horizontalRange The maximum horizontal distance possible for jump type connections.
verticalRange The maximum vertical distance possible for jump type connections.
dropRange The maximum vertical distance possible for drop down type connections.
callBack Pointer to an object derived from Interface iConnectionTestCallBack, which will be called to assess the possibility for connection between pairs of candidate points.

Remarks

This method basically generates a set of candidates for off-mesh connection, based on the mesh external edges and the supplied range parameters.

'Jump' type connection candidates are generated where mesh edge is within the specified range of another mesh edge.
'Drop' type connection candidates are generated where a mesh edge overhangs some other mesh geometry, and the geometry is within the specified drop range.

The calling application is responsable for testing whether each candidate is then actually traversable by pathfinding agents, in each direction, given the exact application specific agent movement possibilities (including collision against local 3D geometry).
Off-mesh connections will be added to this mesh for each connection generated and permitted by the connection test callback.

C# Mapping

void autoGenerateConnections(int sampleSpacing, int localityConstraint, int horizontalRange, int verticalRange, int dropRange, ConnectionTestCallBack callBack);

Java Mapping

void autoGenerateConnections(int sampleSpacing, int localityConstraint, int horizontalRange, int verticalRange, int dropRange, ConnectionTestCallBack callBack);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iMesh::burnContextIntoMesh()