|
A* Pathfinding Project
3.0.9
The A* Pathfinding Project for Unity
|
Represents a collection of settings used to update nodes in a specific area of a graph. More...
Collaboration diagram for GraphUpdateObject:| virtual void | WillUpdateNode (Node node) | Should be called on every node which is updated with this GUO before it is updated. | |
| virtual void | RevertFromBackup () | Reverts penalties and flags (which includes walkability) on every node which was updated using this GUO. | |
| virtual void | Apply (Node node) | Updates the specified node using this GUO's settings. | |
| GraphUpdateObject (Bounds b) | Creates a new GUO with the specified bounds. |
| Bounds | bounds | The bounds to update nodes within. | |
| bool | requiresFloodFill = true | Performance boost. | |
| bool | updatePhysics = true | Use physics checks to update nodes. | |
| NNConstraint | nnConstraint = NNConstraint.None | NNConstraint to use. | |
| int | addPenalty = 0 | Penalty to add to the nodes. | |
| bool | modifyWalkability = false | If true, all nodes walkable variables will be set to setWalkability. | |
| bool | setWalkability = false | If modifyWalkability is true, the nodes' walkable variable will be set to this. | |
| int | tagsChange = 0 | Which tags to change. | |
| int | tagsValue = 0 | The values to which the tags will be changed. | |
| bool | trackChangedNodes = false | ||
| List< Node > | changedNodes | ||
| List< ulong > | backupData |
Represents a collection of settings used to update nodes in a specific area of a graph.
| GraphUpdateObject | ( | Bounds | b | ) |
Creates a new GUO with the specified bounds.
| virtual void RevertFromBackup | ( | ) | [virtual] |
Reverts penalties and flags (which includes walkability) on every node which was updated using this GUO.
Data for reversion is only saved if #trackChangedNodes is true
| virtual void WillUpdateNode | ( | Node | node | ) | [virtual] |
Should be called on every node which is updated with this GUO before it is updated.
| int addPenalty = 0 |
Penalty to add to the nodes.
| Bounds bounds |
The bounds to update nodes within.
| bool modifyWalkability = false |
If true, all nodes walkable variables will be set to setWalkability.
NNConstraint to use.
The Pathfinding::NNConstraint::SuitableGraph function will be called on the NNConstraint to enable filtering of which graphs to update.
| bool requiresFloodFill = true |
Performance boost.
This controlls if a flood fill will be carried out after this GUO has been applied.
If you are sure that a GUO will not modify walkability or connections. You can set this to false. For example when only updating penalty values it can save processing power when setting this to false. Especially on large graphs.
If using the basic GraphUpdateObject (not a derived class), a quick way to check if it is going to need a flood fill is to check if modifyWalkability is true or updatePhysics is true.
| bool setWalkability = false |
If modifyWalkability is true, the nodes' walkable variable will be set to this.
| int tagsChange = 0 |
Which tags to change.
| int tagsValue = 0 |
The values to which the tags will be changed.
| bool updatePhysics = true |
Use physics checks to update nodes.
When updating a grid graph and this is true, the nodes' position and walkability will be updated using physics checks with settings from "Collision Testing" and "Height Testing". Also when updating a ListGraph, setting this to true will make it re-evaluate all connections in the graph which passes through the bounds. This has no effect when updating GridGraphs if modifyWalkability is turned on