Vertices container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Adjust error)
(Updated for change to the rules re vertices appearing in more than one list.)
 
Line 2: Line 2:
 
The vertices subcontainer defines the attachment points for the spline listed in the [[attached-track container]].  
 
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.  
+
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. For example:
  
 
       0                                  "a.road0a"
 
       0                                  "a.road0a"
 
       1                                  "a.road0b"
 
       1                                  "a.road0b"
       2                                  "a.road1b"
+
       2                                  "a.road0c"
       3                                  "a.road1a"
+
       3                                  "a.road0d"
 +
 
 +
would define a path that can be attached at a.road0a and a.road0d.
  
 
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.   
 
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:
+
Identical segments must not be repeated within the attached-track container. An attachment point that appears in more than one vertices subcontainer creates a junction of the two paths through the mesh.  This junction vertex should not be an end point. The following additional vertices subcontainer could be used with the example above:
  
 
       0                                  "a.road1a"
 
       0                                  "a.road1a"
 
       1                                  "a.road1b"
 
       1                                  "a.road1b"
       2                                  "a.road2b"
+
       2                                  "a.road0c"
      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 obtuse for both, the left path will be chosen.  If only one path is obtuse that path will be chosen.  If neither path is obtuse 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 0d.  There is a junction at 0c. The actual layout of the attachment points within the mesh would probably be:
 
+
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
+
  0a---0b-----------0c---0d
 
                   /
 
                   /
 
                   /   
 
                   /   
                 2b
+
                 1b
 
                 /
 
                 /
               2a
+
               1a
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.
+
 
 +
If a vehicle is presented with two paths at a junction where the divergence is obtuse for both (as entering from the base of a 'Y'), the left path will be chosen. If only one path is obtuse (as entering from the arm of a 'Y') then that path will be chosen.  If neither divergence is obtuse then [TBD].  In the above example, vehicles entering at 1a will travel to 0d, and vehicles entering at 0d will travel to 1a.
 +
 
 +
Paths that cross within the geometry of the mesh do not create junctions.
 +
 
 +
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 0d will be an extension of the segment 0c-0d.  For this reason it is common practice to always define external attachment points as one of a pair that is specially positioned 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. 
 +
 
  
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. 
 
  
  
 
==Categories==
 
==Categories==
 
[[Category:Config Container|J]]
 
[[Category:Config Container|J]]

Latest revision as of 10:56, 11 February 2019

[edit] 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. For example:

     0                                   "a.road0a"
     1                                   "a.road0b"
     2                                   "a.road0c"
     3                                   "a.road0d"

would define a path that can be attached at a.road0a and a.road0d.

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. An attachment point that appears in more than one vertices subcontainer creates a junction of the two paths through the mesh. This junction vertex should not be an end point. The following additional vertices subcontainer could be used with the example above:

     0                                   "a.road1a"
     1                                   "a.road1b"
     2                                   "a.road0c"

For the example shown above, spline connections to the asset will be available at 0a, 1a and 0d. There is a junction at 0c. The actual layout of the attachment points within the mesh would probably be:

0a---0b-----------0c---0d
                  /
                 /  
                1b
               /
              1a

If a vehicle is presented with two paths at a junction where the divergence is obtuse for both (as entering from the base of a 'Y'), the left path will be chosen. If only one path is obtuse (as entering from the arm of a 'Y') then that path will be chosen. If neither divergence is obtuse then [TBD]. In the above example, vehicles entering at 1a will travel to 0d, and vehicles entering at 0d will travel to 1a.

Paths that cross within the geometry of the mesh do not create junctions.

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 0d will be an extension of the segment 0c-0d. For this reason it is common practice to always define external attachment points as one of a pair that is specially positioned 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.



[edit] Categories

Personal tools