/// <summary> /// Returns whether this <see cref="GridVertex"/> is traversable with the given motility. /// </summary> /// <remarks> /// A <see cref="GridVertex"/> also checks with its protruding edges and touching nodes, as any of them can also /// prohibit movement through a corner. If any of them return false, then this method returns false. /// </remarks> /// <param name="motility">The agent's motility</param> /// <returns><c>true</c> if the agent is capable of traversing this edge with one (or more) of its motilities.</returns> public bool IsTraversable(Motility motility) { throw new System.NotImplementedException(); // checks internal motility and the motility of its protruding edges and touching nodes // if the vertex has 'Motility.Unconstrained' set then it does not explicitly block any movement }
public bool IsTraversable(Motility motility) { // TODO: Check its own internal motility (based on if an object is on the edge) // TODO: Ask both of its joining nodes if they are traversable. throw new System.NotImplementedException(); }
public GridEdge(float weight, Motility motility, Vec2 position, Direction annotation) { Weight = weight; Motility = motility; //Position = position; //Annotation = annotation; Location = new GridPoint(position, annotation); }
public virtual bool CanEnter(Motility motility, PathfindingNode <T> neighbor) { throw new System.NotImplementedException(); // Check internal motility // Check motility of edge connecting this and neighbor }
/// <summary> /// Returns whether this <see cref="GridEdge"/> is traversable with the given motility. /// </summary> /// <param name="motility">The agent's motility</param> /// <returns><c>true</c> if the agent is capable of traversing this edge with one (or more) of its motilities.</returns> public bool IsTraversable(Motility motility) { // NOTE: Checks internal motility only // if the edge has 'Motility.Unconstrained' set then it does not explicitly block any movement if (Motility == Motility.Unconstrained) { return(true); } return(motility.Contains(Motility)); }
public bool CanTraverse(Motility motility) { throw new System.NotImplementedException(); }
} // The thing the node represents public PathfindingNode(T value, Motility motility) { Motility = motility; Value = value; }
public virtual bool IsTraversable(Motility motility) { throw new System.NotImplementedException(); // Check internal motility }
public PathfindingEdge(T value, float weight, Motility motility) { Motility = motility; Weight = weight; Value = value; }
public GridVertex(float weight, Motility motility, Vec2 position) { Weight = weight; Motility = motility; Location = new GridPoint(position, Direction.NW); }
public void UnsetMotilityFlag(Motility motility) { _motility -= motility; }
public void SetMotilityFlag(Motility motility) { _motility |= motility; }
public bool IsTraversable(Motility motility) { return(_motility.Contains(motility)); }