/// <summary> /// Static factory method to create an empty-value TransportWay instance. /// </summary> /// <returns>The new empty-value object.</returns> public static TransportWay MakeEmpty() { var nullId = new TransportWayId { CellKey = new TransportCellKey(), LocalWayId = -1, NetworkType = TransportNetworkType.Road }; return(new TransportWay(nullId, new List <DoubleVector3>(), new List <double>(), 0.0, 0.0, TransportWayDirection.ClosedInBothDirections, "", 0.0, 0.0)); }
internal TransportDirectedEdge( TransportDirectedEdgeId id, TransportNodeId nodeIdA, TransportNodeId nodeIdB, TransportWayId wayId, bool isWayReversed ) { this.Id = id; this.NodeIdA = nodeIdA; this.NodeIdB = nodeIdB; this.WayId = wayId; this.IsWayReversed = isWayReversed; }
internal TransportWay( TransportWayId id, IList <DoubleVector3> centerLinePoints, IList <double> centerLineSplineParams, double lengthMeters, double halfWidthMeters, TransportWayDirection wayDirection, string classification, double averageSpeedKph, double approximateSpeedLimitKph ) { this.Id = id; this.CenterLinePoints = centerLinePoints; this.CenterLineSplineParams = centerLineSplineParams; this.LengthMeters = lengthMeters; this.HalfWidthMeters = halfWidthMeters; this.WayDirection = wayDirection; this.Classification = classification; this.AverageSpeedKph = averageSpeedKph; this.ApproximateSpeedLimitKph = approximateSpeedLimitKph; }
/// <summary> /// Get a string representation for a given TransportWayId. /// </summary> /// <param name="transportApi">TransportApi instance.</param> /// <param name="wayId">The id of a TransportDirectedWay.</param> /// <returns>A string representation of the id, in format \`\`\`<networkType>:<cellKey>:<localId>\`\`\`.</returns> static public string WayIdToString(this TransportApi transportApi, TransportWayId wayId) { return(string.Format("{0}:{1}:{2}", wayId.NetworkType, transportApi.TransportCellKeyToString(wayId.CellKey), wayId.LocalWayId)); }
/// <summary> /// The TransportWay value associated with the given TransportWayId key. /// </summary> /// <param name="wayId">The id of the TransportWay to get.</param> /// <param name="way">On return, contains the value associated with transportWayId if found; else an empty /// value as returned by TransportWay.MakeEmpty().</param> /// <returns>True if a TransportWay object with Id equal to wayId was found, else false.</returns> public bool TryGetWay(TransportWayId wayId, out TransportWay way) { return(m_apiInternal.TryGetWay(wayId, out way)); }
public bool TryGetWay(TransportWayId wayId, out TransportWay way) { return(TryFetchWay(wayId.ToInterop(), out way)); }