Vertices container
Vertices subcontainer
The vertices subcontainer defines the attachment points for the spline listed in the attached-track container.
The vertices subcontainer is a list of name/attachment point pairs. The start and end of the list define points at which the attached spline will connect to the asset (end points). Attachment circles will display at these points. Intermediate points define the path of the spline through the mesh. Attachment circles will not display for intermediate points.
0 "a.road0a" 1 "a.road0b" 2 "a.road1b" 3 "a.road1a"
The name can be any unique identifier, but it is customary to use contiguous sequential numbers. The attachment points must exist in the mesh. The naming of the attachment points must follow the Trainz standard for attachment names, but the name is not significant in defining the path of the spline.
Identical segments must not be repeated within the attached-track container, but the same segment defined in the opposite direction is not regarded as identical. The following additional vertices subcontainer could be used with the example above:
0 "a.road1a" 1 "a.road1b" 2 "a.road2b" 3 "a.road2a"
When an attachment point appears in more than one vertices subcontainer it creates a junction. If a vehicle is presented with two paths at a junction where the change in direction is acute for both, the left path will be chosen. If only one path is acute that path will be chosen. If neither path is acute then [TBD]. Paths that cross within the geometry of the mesh do not create junctions. It is not recommended to define end points (first and last in the list) as junctions.
For the example shown above, spline connections to the asset will be available at 0a, 1a and 2a. There is a junction at 1b. The actual layout of the attachment points within the mesh is:
0a---0b-----------1b---1a / / 2b / 2a
Vehicles entering at 0a will travel to 1a. Vehicles entering at 1a will travel to 2a, and vehicles entering at 2a will travel to 1a.
The angle at which the attached spline connects to the asset is determined by the angle of the first segment for that attachment point, which is always a straight line. The orientation of the attachment point is not relevant. In the above example a spline joined at 2a will be an extension of the segment 2b-2a. For this reason it is common practice to always define external attachment points as one of a pair, so that the pair defines the correct angle for the attached spline. Segments that do not include an end point will be formed as a curve.