/// <summary> /// Static factory method to create an empty-value TransportDirectedEdge instance. /// </summary> /// <returns>The new empty-value object.</returns> public static TransportDirectedEdge MakeEmpty() { var nullId = new TransportDirectedEdgeId { CellKey = new TransportCellKey(), LocalDirectedEdgeId = -1, NetworkType = TransportNetworkType.Road }; return(new TransportDirectedEdge(nullId, new TransportNodeId(), new TransportNodeId(), new TransportWayId(), false)); }
/// <summary> /// Static factory method to create an empty-value TransportPositionerPointOnGraph instance. /// </summary> /// <returns>The new empty-value object.</returns> public static TransportPositionerPointOnGraph MakeEmpty() { return(new TransportPositionerPointOnGraph( isMatched: false, isWayReversed: false, directedEdgeId: TransportDirectedEdgeId.MakeEmpty(), parameterizedPointOnWay: 0.0, pointOnWay: DoubleVector3.zero, directionOnWay: DoubleVector3.zero, headingOnWayDegrees: 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; }
public TransportPositionerPointOnGraph( bool isMatched, bool isWayReversed, TransportDirectedEdgeId directedEdgeId, double parameterizedPointOnWay, DoubleVector3 pointOnWay, DoubleVector3 directionOnWay, double headingOnWayDegrees ) { IsMatched = isMatched; IsWayReversed = isWayReversed; DirectedEdgeId = directedEdgeId; ParameterizedPointOnWay = parameterizedPointOnWay; PointOnWay = pointOnWay; DirectionOnWay = directionOnWay; HeadingOnWayDegrees = headingOnWayDegrees; }
/// <summary> /// Get a string representation for a given TransportDirectedEdgeId. /// </summary> /// <param name="transportApi">TransportApi instance.</param> /// <param name="directedEdgeId">The id of a TransportDirectedEdge.</param> /// <returns>A string representation of the id, in format \`\`\`<networkType>:<cellKey>:<localId>\`\`\`.</returns> static public string DirectedEdgeIdToString(this TransportApi transportApi, TransportDirectedEdgeId directedEdgeId) { return(string.Format("{0}:{1}:{2}", directedEdgeId.NetworkType, transportApi.TransportCellKeyToString(directedEdgeId.CellKey), directedEdgeId.LocalDirectedEdgeId)); }
/// <summary> /// The TransportDirectedEdge value associated with the given TransportDirectedEdgeId key. /// </summary> /// <param name="directedEdgeId">The id of the TransportDirectedEdge to get.</param> /// <param name="directedEdge">On return, contains the value associated with directedEdgeId if found; else /// an empty value as returned by DirectedEdge.MakeEmpty().</param> /// <returns>True if a TransportDirectedEdge object with Id equal to directedEdgeId was found, else false.</returns> public bool TryGetDirectedEdge(TransportDirectedEdgeId directedEdgeId, out TransportDirectedEdge directedEdge) { return(m_apiInternal.TryGetDirectedEdge(directedEdgeId, out directedEdge)); }
public bool TryGetDirectedEdge(TransportDirectedEdgeId directedEdgeId, out TransportDirectedEdge directedEdge) { return(TryFetchDirectedEdge(directedEdgeId.ToInterop(), out directedEdge)); }