コード例 #1
0
        /// <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));
        }
コード例 #2
0
 /// <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
                ));
 }
コード例 #3
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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 /// <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 \`\`\`&lt;networkType&gt;:&lt;cellKey&gt;:&lt;localId&gt;\`\`\`.</returns>
 static public string DirectedEdgeIdToString(this TransportApi transportApi, TransportDirectedEdgeId directedEdgeId)
 {
     return(string.Format("{0}:{1}:{2}", directedEdgeId.NetworkType, transportApi.TransportCellKeyToString(directedEdgeId.CellKey), directedEdgeId.LocalDirectedEdgeId));
 }
コード例 #6
0
 /// <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));
 }
コード例 #7
0
 public bool TryGetDirectedEdge(TransportDirectedEdgeId directedEdgeId, out TransportDirectedEdge directedEdge)
 {
     return(TryFetchDirectedEdge(directedEdgeId.ToInterop(), out directedEdge));
 }