A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
PathNNConstraint Class Reference

A special NNConstraint which can use different logic for the start node and end node in a path. More...

+ Inheritance diagram for PathNNConstraint:
+ Collaboration diagram for PathNNConstraint:

Public Member Functions

virtual void SetStart (Node node)
 Called after the start node has been found.
 
- Public Member Functions inherited from NNConstraint
 NNConstraint ()
 Default constructor.
 
virtual bool Suitable (Node node)
 Returns whether or not the node conforms to this NNConstraint's rules.
 
virtual bool SuitableGraph (int graphIndex, NavGraph graph)
 Returns whether or not the graph conforms to this NNConstraint's rules.
 

Properties

static new PathNNConstraint Default [get]
 
- Properties inherited from NNConstraint
static NNConstraint Default [get]
 The default NNConstraint.
 
static NNConstraint None [get]
 Returns a constraint which will not filter the results.
 

Additional Inherited Members

- Public Attributes inherited from NNConstraint
int area = -1
 Area ID to constrain to.
 
bool constrainArea = false
 Only treat nodes in the area area as suitable.
 
bool constrainDistance = true
 Constrain distance to node.
 
bool constrainTags = true
 Sets if tags should be constrained.
 
bool constrainWalkability = true
 Only treat nodes with the walkable flag set to the same as walkable as suitable.
 
int graphMask = -1
 Graphs treated as valid to search on.
 
int tags = -1
 Nodes which have any of these tags set are suitable.
 
bool walkable = true
 What must the walkable flag on a node be for it to be suitable.
 

Detailed Description

A special NNConstraint which can use different logic for the start node and end node in a path.

A PathNNConstraint can be assigned to the Path::nnConstraint field, the path will first search for the start node, then it will call SetStart and proceed with searching for the end node (nodes in the case of a MultiTargetPath).
The default PathNNConstraint will constrain the end point to lie inside the same area as the start point.

Member Function Documentation

virtual void SetStart ( Node  node)
virtual

Called after the start node has been found.

This is used to get different search logic for the start and end nodes in a path

+ Here is the caller graph for this function:


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