An arc is defined with its two extremity nodes StartNode and EndNode therefore it is oriented. It is also characterized by a crossing factor named 'Weight'. This value represents the difficulty to reach the ending node from the starting one.
More...
|
| Arc (Node Start, Node End) |
| Arc constructor.
|
override string | ToString () |
| Returns the textual description of the arc. object.ToString() override.
|
override bool | Equals (object O) |
| Object.Equals override. Tells if two arcs are equal by comparing StartNode and EndNode.
|
override int | GetHashCode () |
| Object.GetHashCode override.
|
|
virtual double | CalculateLength () |
| Performs the calculous that returns the arc's length Can be overriden for derived types of arcs that are not linear.
|
|
Node | StartNode [get, set] |
| Gets/Sets the node from which the arc starts.
|
Node | EndNode [get, set] |
| Gets/Sets the node to which the arc ends.
|
double | Weight [get, set] |
| Sets/Gets the weight of the arc. This value is used to determine the cost of moving through the arc.
|
bool | Passable [get, set] |
| Gets/Sets the functional state of the arc. 'true' means that the arc is in its normal state. 'false' means that the arc will not be taken into account (as if it did not exist or if its cost were infinite).
|
double | Length [get] |
| Gets arc's length.
|
virtual double | Cost [get] |
| Gets the cost of moving through the arc. Can be overriden when not simply equals to Weight*Length.
|
An arc is defined with its two extremity nodes StartNode and EndNode therefore it is oriented. It is also characterized by a crossing factor named 'Weight'. This value represents the difficulty to reach the ending node from the starting one.
◆ Arc()
Pathfinding.Arc.Arc |
( |
Node | Start, |
|
|
Node | End ) |
Arc constructor.
- Exceptions
-
ArgumentNullException | Extremity nodes cannot be null. |
ArgumentException | StartNode and EndNode must be different. |
- Parameters
-
Start | The node from which the arc starts. |
End | The node to which the arc ends. |
◆ CalculateLength()
virtual double Pathfinding.Arc.CalculateLength |
( |
| ) |
|
|
protectedvirtual |
Performs the calculous that returns the arc's length Can be overriden for derived types of arcs that are not linear.
- Returns
◆ Equals()
override bool Pathfinding.Arc.Equals |
( |
object | O | ) |
|
Object.Equals override. Tells if two arcs are equal by comparing StartNode and EndNode.
- Exceptions
-
ArgumentException | Cannot compare an arc with another type. |
- Parameters
-
O | The arc to compare with. |
- Returns
- 'true' if both arcs are equal.
◆ GetHashCode()
override int Pathfinding.Arc.GetHashCode |
( |
| ) |
|
Object.GetHashCode override.
- Returns
- HashCode value.
◆ ToString()
override string Pathfinding.Arc.ToString |
( |
| ) |
|
Returns the textual description of the arc. object.ToString() override.
- Returns
- String describing this arc.
◆ Cost
virtual double Pathfinding.Arc.Cost |
|
get |
Gets the cost of moving through the arc. Can be overriden when not simply equals to Weight*Length.
◆ EndNode
Node Pathfinding.Arc.EndNode |
|
getset |
Gets/Sets the node to which the arc ends.
- Exceptions
-
ArgumentNullException | EndNode cannot be set to null. |
ArgumentException | EndNode cannot be set to StartNode. |
◆ Length
double Pathfinding.Arc.Length |
|
get |
◆ Passable
bool Pathfinding.Arc.Passable |
|
getset |
Gets/Sets the functional state of the arc. 'true' means that the arc is in its normal state. 'false' means that the arc will not be taken into account (as if it did not exist or if its cost were infinite).
◆ StartNode
Node Pathfinding.Arc.StartNode |
|
getset |
Gets/Sets the node from which the arc starts.
- Exceptions
-
ArgumentNullException | StartNode cannot be set to null. |
ArgumentException | StartNode cannot be set to EndNode. |
◆ Weight
double Pathfinding.Arc.Weight |
|
getset |
Sets/Gets the weight of the arc. This value is used to determine the cost of moving through the arc.