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

Public Member Functions

 MyRDPath (MyRDPathfinding pathfinding, Vector3D begin, IMyDestinationShape destination)
 
void Invalidate ()
 Will be called on the path if it should be invalidated for any reason. Also, it the path is no longer needed, it should be invalidated to prevent holding references etc. More...
 
bool GetNextTarget (Vector3D position, out Vector3D target, out float targetRadius, out IMyEntity relativeEntity)
 Returns the next target along the path, provided that the agent is currently on the given position More...
 
void Reinit (Vector3D position)
 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...
 
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 12 of file MyRDPath.cs.

Constructor & Destructor Documentation

Sandbox.Game.AI.Pathfinding.MyRDPath.MyRDPath ( MyRDPathfinding  pathfinding,
Vector3D  begin,
IMyDestinationShape  destination 
)
inline

Definition at line 24 of file MyRDPath.cs.

Member Function Documentation

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

Gets called every frame for the purposes of debug draw

Implements Sandbox.Game.AI.Pathfinding.IMyPath.

Definition at line 98 of file MyRDPath.cs.

bool Sandbox.Game.AI.Pathfinding.MyRDPath.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 51 of file MyRDPath.cs.

void Sandbox.Game.AI.Pathfinding.MyRDPath.Invalidate ( )
inline

Will be called on the path if it should be invalidated for any reason. Also, it the path is no longer needed, it should be invalidated to prevent holding references etc.

Implements Sandbox.Game.AI.Pathfinding.IMyPath.

Definition at line 46 of file MyRDPath.cs.

void Sandbox.Game.AI.Pathfinding.MyRDPath.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 92 of file MyRDPath.cs.

Property Documentation

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

Definition at line 38 of file MyRDPath.cs.

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

Definition at line 40 of file MyRDPath.cs.

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

Definition at line 42 of file MyRDPath.cs.

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

Definition at line 44 of file MyRDPath.cs.


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