DHART
Loading...
Searching...
No Matches
DHARTAPI.Pathfinding.PathMember Struct Reference

A ID of a Node in a Path and the cost to it's next element. More...

Public Member Functions

 PathMember (int id, float cost_to_next)
 
bool Equals (PathMember PM2)
 Compare the ID and Cost to next of this PathMember to another. More...
 
override string ToString ()
 Get a string representation of this pathmember's ID and cost to it's next element.
 

Static Public Member Functions

static bool operator== (PathMember PM1, PathMember PM2)
 
static bool operator!= (PathMember PM1, PathMember PM2)
 

Public Attributes

float cost_to_next
 The cost to next node in the path.
 
int id
 The ID of this node.
 

Detailed Description

A ID of a Node in a Path and the cost to it's next element.

Note
The ID held by a pathmember corresponds to the ID of a node in the graph from the path it's generated from. The node corresponding to this path member, stored in the graph's nodes array at the index of it's ID. I.E. if this pathmember's ID is 1, then it points to the node at Graph.getNodes()[1].

Member Function Documentation

◆ Equals()

bool DHARTAPI.Pathfinding.PathMember.Equals ( PathMember  PM2)

Compare the ID and Cost to next of this PathMember to another.

Parameters
PM2Pathmember to compare to this one.
Returns
True if the ID and cost to next of PM2 are equal to that of this pathmember.

The documentation for this struct was generated from the following file: