Class CartesianRoutingService<TObstacle>
The
CartesianRoutingService
can find a shortest route between points by using the generated
routing points as supporting points for its route search.
Inheritance
System.Object
CartesianRoutingService<TObstacle>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Components.Environments.Cartesian.Routing
Assembly: Mars.Components.dll
Syntax
public class CartesianRoutingService<TObstacle>
where TObstacle : IObstacle
Type Parameters
Name | Description |
---|---|
TObstacle |
Constructors
| Improve this Doc View SourceCartesianRoutingService(BoundingBox, IDictionary<TObstacle, Geometry>, IRoutingPointsGenerator, Int32)
Creates the routing service.
Declaration
public CartesianRoutingService(BoundingBox boundingBox, IDictionary<TObstacle, Geometry> obstacles, IRoutingPointsGenerator pointsGenerator, int edgesPerNode = 10)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | boundingBox | Describes the spatial extent. |
System.Collections.Generic.IDictionary<TObstacle, NetTopologySuite.Geometries.Geometry> | obstacles | Holds all obstacles that may influence the route. |
IRoutingPointsGenerator | pointsGenerator | Generates supporting points for the route searching graph. |
System.Int32 | edgesPerNode | Defines the density of the route searching graph. |
Methods
| Improve this Doc View SourceFindRoute(ICharacter, Position)
Finds a route of routing positions from start to goal.
Declaration
public IEnumerable<Position> FindRoute(ICharacter character, Position goal)
Parameters
Type | Name | Description |
---|---|---|
ICharacter | character | The characters position is used as start point for the route search. The start point is not included in the result. The character might be used to check if obstacles can be passed. |
Position | goal | Goal position for the route search. Is included in the result. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Position> | An enumerable of positions that lead to the goal avoiding collisions with geometries. |
ToGeoJson()
The
CartesianRoutingService
can find a shortest route between points by using the generated
routing points as supporting points for its route search.
Declaration
public string ToGeoJson()
Returns
Type | Description |
---|---|
System.String |