Open Rails

TrackCircuitXRefList.GetSectionIndex Method

[This is preliminary documentation and subject to change.]

The tracksections form together a representation of a vector node. Once you give a direction along that vector and the offset from the start, get the index of the TrackCircuitSection at that location

public int GetSectionIndex(
   float offset,
   int direction
);

Parameters

offset
Offset along the vector node where we want to find the tracksection
direction
Direction where we start measuring along the vector node

Return Value

Index of the section that is at the wanted location

See Also

TrackCircuitXRefList Class | Orts.Formats.Msts Namespace