C# Class SharpNav.Crowds.PathCorridor

Afficher le fichier Open project: Robmaister/SharpNav Class Usage Examples

Méthodes publiques

Méthode Description
FindCorners ( SharpNav.Pathfinding.StraightPath corners, NavMeshQuery navquery ) : void
FixPathStart ( NavPolyId safeRef, Microsoft.Xna.Framework.Vector3 safePos ) : bool

Adjust the beginning of the path

GetFirstPoly ( ) : NavPolyId
GetLastPoly ( ) : NavPolyId
IsValid ( int maxLookAhead, NavMeshQuery navquery ) : bool

Determines whether all the polygons in the path are valid

MergeCorridorStartMoved ( SharpNav.Pathfinding.Path path, List visited ) : int

Merge two paths after the start is changed

MergeCorridorStartShortcut ( SharpNav.Pathfinding.Path corridorPath, SharpNav.Pathfinding.Path visitedPath ) : int

Merge two paths when a shorter path is found

MoveOverOffmeshConnection ( NavPolyId offMeshConRef, NavPolyId refs, Microsoft.Xna.Framework.Vector3 &startPos, Microsoft.Xna.Framework.Vector3 &endPos, NavMeshQuery navquery ) : bool
MovePosition ( Microsoft.Xna.Framework.Vector3 npos, NavMeshQuery navquery ) : bool

Move along the NavMeshQuery and update the position

OptimizePathTopology ( NavMeshQuery navquery, NavQueryFilter filter ) : bool

Use a local area path search to try to reoptimize this corridor

OptimizePathVisibility ( Microsoft.Xna.Framework.Vector3 next, float pathOptimizationRange, NavMeshQuery navquery ) : void

Use an efficient local visibility search to try to optimize the corridor between the current position and the next.

PathCorridor ( )
Reset ( NavPolyId reference, Microsoft.Xna.Framework.Vector3 pos ) : void

Resets the path to the first polygon.

SetCorridor ( Microsoft.Xna.Framework.Vector3 target, SharpNav.Pathfinding.Path path ) : void

The current corridor position is expected to be within the first polygon in the path. The target is expected to be in the last polygon.

Method Details

FindCorners() public méthode

public FindCorners ( SharpNav.Pathfinding.StraightPath corners, NavMeshQuery navquery ) : void
corners SharpNav.Pathfinding.StraightPath
navquery NavMeshQuery
Résultat void

FixPathStart() public méthode

Adjust the beginning of the path
public FixPathStart ( NavPolyId safeRef, Microsoft.Xna.Framework.Vector3 safePos ) : bool
safeRef NavPolyId The starting polygon reference
safePos Microsoft.Xna.Framework.Vector3 The starting position
Résultat bool

GetFirstPoly() public méthode

public GetFirstPoly ( ) : NavPolyId
Résultat NavPolyId

GetLastPoly() public méthode

public GetLastPoly ( ) : NavPolyId
Résultat NavPolyId

IsValid() public méthode

Determines whether all the polygons in the path are valid
public IsValid ( int maxLookAhead, NavMeshQuery navquery ) : bool
maxLookAhead int The amount of polygons to examine
navquery NavMeshQuery The NavMeshQuery
Résultat bool

MergeCorridorStartMoved() public méthode

Merge two paths after the start is changed
public MergeCorridorStartMoved ( SharpNav.Pathfinding.Path path, List visited ) : int
path SharpNav.Pathfinding.Path The current path
visited List The visited polygons
Résultat int

MergeCorridorStartShortcut() public méthode

Merge two paths when a shorter path is found
public MergeCorridorStartShortcut ( SharpNav.Pathfinding.Path corridorPath, SharpNav.Pathfinding.Path visitedPath ) : int
corridorPath SharpNav.Pathfinding.Path
visitedPath SharpNav.Pathfinding.Path
Résultat int

MoveOverOffmeshConnection() public méthode

public MoveOverOffmeshConnection ( NavPolyId offMeshConRef, NavPolyId refs, Microsoft.Xna.Framework.Vector3 &startPos, Microsoft.Xna.Framework.Vector3 &endPos, NavMeshQuery navquery ) : bool
offMeshConRef NavPolyId
refs NavPolyId
startPos Microsoft.Xna.Framework.Vector3
endPos Microsoft.Xna.Framework.Vector3
navquery NavMeshQuery
Résultat bool

MovePosition() public méthode

Move along the NavMeshQuery and update the position
public MovePosition ( Microsoft.Xna.Framework.Vector3 npos, NavMeshQuery navquery ) : bool
npos Microsoft.Xna.Framework.Vector3 Current position
navquery NavMeshQuery The NavMeshQuery
Résultat bool

OptimizePathTopology() public méthode

Use a local area path search to try to reoptimize this corridor
public OptimizePathTopology ( NavMeshQuery navquery, NavQueryFilter filter ) : bool
navquery NavMeshQuery The NavMeshQuery
filter SharpNav.Pathfinding.NavQueryFilter
Résultat bool

OptimizePathVisibility() public méthode

Use an efficient local visibility search to try to optimize the corridor between the current position and the next.
public OptimizePathVisibility ( Microsoft.Xna.Framework.Vector3 next, float pathOptimizationRange, NavMeshQuery navquery ) : void
next Microsoft.Xna.Framework.Vector3 The next postion
pathOptimizationRange float The range
navquery NavMeshQuery The NavMeshQuery
Résultat void

PathCorridor() public méthode

public PathCorridor ( )

Reset() public méthode

Resets the path to the first polygon.
public Reset ( NavPolyId reference, Microsoft.Xna.Framework.Vector3 pos ) : void
reference NavPolyId The starting polygon reference
pos Microsoft.Xna.Framework.Vector3 Starting position
Résultat void

SetCorridor() public méthode

The current corridor position is expected to be within the first polygon in the path. The target is expected to be in the last polygon.
public SetCorridor ( Microsoft.Xna.Framework.Vector3 target, SharpNav.Pathfinding.Path path ) : void
target Microsoft.Xna.Framework.Vector3 The target
path SharpNav.Pathfinding.Path The polygon path
Résultat void