Trainz/containers/attached-splines container

The attached-splines" container is an optional top-level config.txt file entry used by the KIND Track content type.

The container provides a mechanism for having one or more child splines attached which run parallel to the shape of a parent spline at a slight offset.
 * Attached splines are used where a spline with one set of rendering or functional behaviour needs to be coupled with a spline with a different set of rendering or functional behaviours. For example, a bridge (scenery) with attached track (functional), or a set of pylons (no stretching or shearing) with some wires strung between them (shearing and stretching to fit.)
 * The attached splines may be render-only splines which effectively don't exist beyond of their rendering behaviour, or they may be fully functional splines whose only specialty is that they move and delete with their parent.

Supported Tags
The "attached-splines" container is a list of subcontainers with no standalone tags. Each attached-splines subcontainer supports the following tags. Each tag is shown here with its default value.

attached-splines { lateral-offset 0.0 use-same-direction 1 spline-kuid  visual-only 0 }

lateral-offset
This decimal tag defines the number of meters that the child spline is offset sideways from its parent's position. The parent is at position 0.0, with positive offsets to the right, and negative offsets to the left.

use-same-direction

 * type: Boolean (0 or 1 only)''

If set (1), this boolean tag causes the child spline to face in the same direction as the parent If clear (0), the child faces backward (180° rotation) to the parent.

spline-kuid
This KUID tag defines the asset type to use for the child spline. A parent spline may have multiple children, which may be of the same or differing types.

visual-only
If set (1), this boolean tag causes the child spline to exist only while being actively rendered. This also removes all functional aspects of the child spline (such as carz, the use of the spline as railway track, connection of other splines, etc.) If clear (0), the child spline is fully instantiated along with the parent. Manual editing of the child spline is prevented in Surveyor but in all other aspects the child spline reacts as if placed manually.

follows-spline-gradient
If set (1), this boolean tag causes the child spline to follow the gradient of this spline rather than leaving the child to determine whether it should follow the spline gradient or the ground height. This is useful when the child is an asset which would normally follow the ground height (such as a regular track) but where the attachment location on the parent does not follow the ground height (such as on a bridge.)

Performance Notes

 * It is strongly recommended to avoid nesting of multiple layers of splines (eg. a single parent asset should have one or more child assets, and no grandchildren.)
 * Visual-only splines should be used where possible, as this gives a substantial performance benefit.
 * Any use of attached splines comes with a performance penalty. Where possible, a single spline which includes all the necessary features is preferred to use of this container resource.
 * CAVEAT: There is no connection between the LOD level of a parent spline, and the LOD level of a child spline. Do not assume that they will change LOD levels at the same time. (Reason: LOD is distance dependent, the offset alone&mdash;even if the LOD distance trigger values are identical&mdash;because of the trigonometric difference from the introduces a significant difference in distances in high resolution LOD distance ranges.)