PathEngine home previous: XML Ground Meshesnext: Tokenised XML
Contents, Programmers Guide, World Representation, Direct XML Generation, Ground Mesh Validation

Ground Mesh Validation

Mesh validation

The following constraints are applied to meshes created using PathEngine's base mesh format.

Coordinate range

The coordinates for vertices of the mesh must be within the range supported by PathEngine.
(See PathEngine Coordinates for details.)

Empty meshes not supported

The mesh must consist of one or more triangular faces.

Face constraints

Each face must have non-zero area.
The vertices for each face must run clockwise as seen from above.
(Put another way, each vertex must lie on the right of the line formed by the previous two, as seen from above.)

Face vertices
x=20, y=30, z=10
x=20, y=50, z=10
x=20, y=40, z=10
Invalid - zero area
x=20, y=30, z=10
x=20, y=50, z=20
x=20, y=40, z=10
Invalid - non-zero area, but does not face upwards
x=20, y=30, z=10
x=10, y=50, z=10
x=20, y=40, z=10
Invalid - faces downwards
x=20000, y=30, z=10
x=20010, y=50, z=10
x=20000, y=40, z=10
Invalid - x coordinate outside valid range (for evaluation version)

Connectivity constraints

The connectivity between faces is specified explicitly.
An edge may be external (no connection) or else may connect to another face.
Multiple connections cannot be made to a single edge.

Vertices must match across a connection

The vertices each side of a connection must be identical.
The following mesh is invalid because the vertex indices for the edges being connected do not match:

   <vert x="4" y="7"/>
   <vert x="10" y="11"/>
   <vert x="11" y="1"/>
   <vert x="11" y="11"/>
   <vert x="19" y="2"/>
   <tri edge0StartVert="0" edge1StartVert="1" edge2StartVert="2"/>
   <tri edge0StartVert="2" edge1StartVert="3" edge2StartVert="4" edge0Connection="0"/>

non-matching vertices Vertices do not match across a connection

All vertices must be assigned to edges

Unconnected vertices are no longer permitted. All vertices must be assigned to at least one edge.

One tri fan per vertex

Each vertex must be connected to exactly one set on connected tris. It should be possible to reach all edges that are assigned to a given vertex by folling edge connections around that vertex.

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: Tokenised XML