C# Класс SharpNav.Crowds.PathCorridor

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

FindCorners() публичный Метод

public FindCorners ( SharpNav.Pathfinding.StraightPath corners, NavMeshQuery navquery ) : void
corners SharpNav.Pathfinding.StraightPath
navquery NavMeshQuery
Результат void

FixPathStart() публичный Метод

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
Результат bool

GetFirstPoly() публичный Метод

public GetFirstPoly ( ) : NavPolyId
Результат NavPolyId

GetLastPoly() публичный Метод

public GetLastPoly ( ) : NavPolyId
Результат NavPolyId

IsValid() публичный Метод

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
Результат bool

MergeCorridorStartMoved() публичный Метод

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
Результат int

MergeCorridorStartShortcut() публичный Метод

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
Результат int

MoveOverOffmeshConnection() публичный Метод

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
Результат bool

MovePosition() публичный Метод

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
Результат bool

OptimizePathTopology() публичный Метод

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
Результат bool

OptimizePathVisibility() публичный Метод

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
Результат void

PathCorridor() публичный Метод

public PathCorridor ( )

Reset() публичный Метод

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
Результат void

SetCorridor() публичный Метод

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
Результат void