internal TransportNode( TransportNodeId id, DoubleVector3 point, IList <TransportDirectedEdgeId> incidentDirectedEdges ) { this.Id = id; this.Point = point; this.IncidentDirectedEdges = incidentDirectedEdges; }
/// <summary> /// Static factory method to create an empty-value TransportNode instance. /// </summary> /// <returns>The new empty-value object.</returns> public static TransportNode MakeEmpty() { var nullId = new TransportNodeId { CellKey = new TransportCellKey(), LocalNodeId = -1, NetworkType = TransportNetworkType.Road }; return(new TransportNode(nullId, DoubleVector3.zero, new List <TransportDirectedEdgeId>())); }
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; }
/// <summary> /// Get a string representation for a given TransportNodeId. /// </summary> /// <param name="transportApi">TransportApi instance.</param> /// <param name="nodeId">The id of a TransportNode.</param> /// <returns>A string representation of the id, in format \`\`\`<networkType>:<cellKey>:<localId>\`\`\`.</returns> static public string NodeIdToString(this TransportApi transportApi, TransportNodeId nodeId) { return(string.Format("{0}:{1}:{2}", nodeId.NetworkType, transportApi.TransportCellKeyToString(nodeId.CellKey), nodeId.LocalNodeId)); }
/// <summary> /// Get the TransportNode value associated with the given TransportNodeId key. /// </summary> /// <param name="nodeId">The id of the TransportNode to get.</param> /// <param name="node">On return, contains the value associated with nodeId if found; else an empty value /// as returned by TransportNode.MakeEmpty().</param> /// <returns>True if a TransportNode object with Id equal to nodeId was found, else false.</returns> public bool TryGetNode(TransportNodeId nodeId, out TransportNode node) { return(m_apiInternal.TryGetNode(nodeId, out node)); }
public bool TryGetNode(TransportNodeId nodeId, out TransportNode node) { return(TryFetchNode(nodeId.ToInterop(), out node)); }