Class FaceStarUnit
A Face wrapper used during FaceAStar calculations.
Inheritance
Implements
Namespace: AlchemyBow.Navigation.Utilities
Assembly: AlchemyBow.Navigation.dll
Syntax
public sealed class FaceStarUnit : IComparable<FaceStarUnit>
Constructors
| Improve this Doc View SourceFaceStarUnit(Face)
Creates a new instance of the FaceStarUnit class with default values.
Declaration
public FaceStarUnit(Face face)
Parameters
| Type | Name | Description |
|---|---|---|
| Face | face | A face to wrap. |
FaceStarUnit(Face, FaceStarUnit, Single, Single)
Creates a new instance of the FaceStarUnit class.
Declaration
public FaceStarUnit(Face face, FaceStarUnit parent, float gCost, float hCost)
Parameters
| Type | Name | Description |
|---|---|---|
| Face | face | A face to wrap. |
| FaceStarUnit | parent | An A* parent. |
| System.Single | gCost | An A* g cost. |
| System.Single | hCost | An A* h cost. |
Fields
| Improve this Doc View Sourceface
The wrapped face.
Declaration
public readonly Face face
Field Value
| Type | Description |
|---|---|
| Face | The wrapped face. |
gCost
The A* g cost.
Declaration
public float gCost
Field Value
| Type | Description |
|---|---|
| System.Single | The A* g cost. |
hCost
The A* h cost.
Declaration
public float hCost
Field Value
| Type | Description |
|---|---|
| System.Single | The A* h cost. |
parent
The A* parent.
Declaration
public FaceStarUnit parent
Field Value
| Type | Description |
|---|---|
| FaceStarUnit | The A* parent. |
Properties
| Improve this Doc View SourceFCost
The A* f cost.
Declaration
public float FCost { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The A* f cost. |
Methods
| Improve this Doc View SourceCompareTo(FaceStarUnit)
Compares the current instance with another instance of the FaceStarUnit class based on f cost and (then) g cost of the A* algorithm.
Declaration
public int CompareTo(FaceStarUnit other)
Parameters
| Type | Name | Description |
|---|---|---|
| FaceStarUnit | other | The other instance to compare with this instance. |
Returns
| Type | Description |
|---|---|
| System.Int32 | An integer that indicates whether the current instance precedes, follows, or occurs in the same position in the A* order as the other object. |
Update(FaceStarUnit, Single, Single)
Updates values of the unit.
Declaration
public void Update(FaceStarUnit parent, float gCost, float hCost)
Parameters
| Type | Name | Description |
|---|---|---|
| FaceStarUnit | parent | The new A* parent. |
| System.Single | gCost | The new A* gCost. |
| System.Single | hCost | The new A* hCost. |