Space Engineers
Public Member Functions | Properties | List of all members
Sandbox.Game.AI.Pathfinding.MySmartPath Class Reference
Inheritance diagram for Sandbox.Game.AI.Pathfinding.MySmartPath:
Sandbox.Game.AI.Pathfinding.IMyHighLevelPrimitiveObserver Sandbox.Game.AI.Pathfinding.IMyPath

Public Member Functions

 MySmartPath (MyPathfinding pathfinding)
 
void Init (Vector3D start, MySmartGoal goal)
 
void Reinit (Vector3D newStart)
 Reinitializes the path, starting from the given position. The target stays the same. The purpose of this is to try to move towards the goal again if PathCompleted returns true, but the target moved while going towards it. More...
 
bool GetNextTarget (Vector3D currentPosition, out Vector3D targetWorld, out float radius, out IMyEntity relativeEntity)
 Returns the next target along the path, provided that the agent is currently on the given position More...
 
void Invalidate ()
 
void DebugDraw ()
 Gets called every frame for the purposes of debug draw More...
 

Properties

IMyDestinationShape Destination [get]
 
IMyEntity EndEntity [get]
 
bool IsValid [get]
 
bool PathCompleted [get]
 
- Properties inherited from Sandbox.Game.AI.Pathfinding.IMyPath
IMyDestinationShape Destination [get]
 Current destination (goal) for the path More...
 
IMyEntity EndEntity [get]
 Entity towards which the path is going More...
 
bool IsValid [get]
 Says, whether the path is in a valid and consistent state. As an example, a path can be invalid when no path could be found or when the underlying data structues changed while using the path More...
 
bool PathCompleted [get]
 Will be true when the previously set path is successfully completed More...
 

Detailed Description

Definition at line 17 of file MySmartPath.cs.

Constructor & Destructor Documentation

Sandbox.Game.AI.Pathfinding.MySmartPath.MySmartPath ( MyPathfinding  pathfinding)
inline

Definition at line 79 of file MySmartPath.cs.

Member Function Documentation

void Sandbox.Game.AI.Pathfinding.MySmartPath.DebugDraw ( )
inline

Gets called every frame for the purposes of debug draw

Implements Sandbox.Game.AI.Pathfinding.IMyPath.

Definition at line 510 of file MySmartPath.cs.

bool Sandbox.Game.AI.Pathfinding.MySmartPath.GetNextTarget ( Vector3D  position,
out Vector3D  target,
out float  targetRadius,
out IMyEntity  relativeEntity 
)
inline

Returns the next target along the path, provided that the agent is currently on the given position

Parameters
positionCurrent position of the agent
targetNext target for the agent to go to
targetRadiusDestination radius allowing some tolerance for steering
relativeEntityIf the target is relative to an entity, the entity will be returned in this argument (currently unused).
Returns
True if the next target was successfully found

Implements Sandbox.Game.AI.Pathfinding.IMyPath.

Definition at line 156 of file MySmartPath.cs.

void Sandbox.Game.AI.Pathfinding.MySmartPath.Init ( Vector3D  start,
MySmartGoal  goal 
)
inline

Definition at line 86 of file MySmartPath.cs.

void Sandbox.Game.AI.Pathfinding.MySmartPath.Invalidate ( )
inline
void Sandbox.Game.AI.Pathfinding.MySmartPath.Reinit ( Vector3D  position)
inline

Reinitializes the path, starting from the given position. The target stays the same. The purpose of this is to try to move towards the goal again if PathCompleted returns true, but the target moved while going towards it.

Parameters
positionThe current position from which we want the pathfinding to be performed

Implements Sandbox.Game.AI.Pathfinding.IMyPath.

Definition at line 133 of file MySmartPath.cs.

Property Documentation

IMyDestinationShape Sandbox.Game.AI.Pathfinding.MySmartPath.Destination
get

Definition at line 41 of file MySmartPath.cs.

IMyEntity Sandbox.Game.AI.Pathfinding.MySmartPath.EndEntity
get

Definition at line 42 of file MySmartPath.cs.

bool Sandbox.Game.AI.Pathfinding.MySmartPath.IsValid
get

Definition at line 45 of file MySmartPath.cs.

bool Sandbox.Game.AI.Pathfinding.MySmartPath.PathCompleted
get

Definition at line 72 of file MySmartPath.cs.


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