PathEngine home previous: Additional Features Overviewnext: Off‑Mesh Connections
Contents, Overview, Additional Features Overview, Steps and Staircases

Steps and Staircases

Because PathEngine's internal ground mesh representation uses a face/edge/vertex mesh representation it is possible for the height component of a vertex to be different on either side of a connection, and this then provides a convenient way to represent vertical discontinuities in the ground for features such as steps and staircases.

The mesh "stairs.xml" in the "resource/meshes" subdirectory of the release provides an example of how staircases may be represented in a PathEngine mesh.

Because height differences are allowed across a connection, only the top surface of the stairs is represented.
The internal mesh representation does not represent vertical faces explicitly. Instead these take the form of height discontinuities at connections between horizontal faces.


A path and smoothed path through the "stairs.xml" mesh.


The same scene, viewed from an angle.

The advantage of representing stairs in this manner is that methods such as iMesh::heightAtPosition() will then take the shape of the stairs into account.

An alternative approach is to represent the stairs with a ramp. This alternative makes more sense if you are not concerned about exact ground height for agents standing on the stairs.

As long as the edges of the top surface of the staircase lines up perfectly, there should be no performance cost for most queries as a result of explicit representation of stairs.

Conversion from face/vertex representation

PathEngine's content processing functionality enables vertical discontinuities to be represented by vertical faces in the content-side face/vertex representation and converts these to heights per edge in PathEngine's internal representation.


Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: Off‑Mesh Connections