Open Rails

TrackCircuitXRefList.GetXRefIndex 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 TrackCircuitSectionXref at that location

public int GetXRefIndex(
   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 in the current list of crossreferences

See Also

TrackCircuitXRefList Class | Orts.Formats.Msts Namespace