Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DFollowPath Class Reference

The U4DFollowPath class implements AI steering Path Following behavior. More...

Inherits U4DEngine::U4DSeek.

Public Member Functions

 U4DFollowPath ()
 class constructor
 
 ~U4DFollowPath ()
 class destructor
 
U4DVector3n getSteering (U4DDynamicAction *uAction, std::vector< U4DSegment > &uPathContainer)
 Computes the velociry for steering along the provided path. More...
 
void setPredictTime (float uPredictTime)
 sets the time in the future to predict the position More...
 
void setPathOffset (float uPathOffset)
 set the distance along the path to generate the target position More...
 
void setPathRadius (float uPathRadius)
 set the path radius More...
 
int getCurrentPathIndex ()
 gets the current path the pursuer is following More...
 
- Public Member Functions inherited from U4DEngine::U4DSeek
 U4DSeek ()
 class constructor
 
 ~U4DSeek ()
 class destructor
 
U4DVector3n getSteering (U4DDynamicAction *uAction, U4DVector3n &uTargetPosition)
 Computes the velocity for steering. More...
 
- Public Member Functions inherited from U4DEngine::U4DSteering
 U4DSteering ()
 class constructor for steering behavior
 
 ~U4DSteering ()
 class destructor for steering behavior
 
virtual U4DVector3n getSteering (U4DDynamicAction *uPursuer, U4DDynamicAction *uEvader)
 Computes the velocity for steering. More...
 
virtual U4DVector3n getSteering (U4DDynamicAction *uAction)
 Computes the velocity for steering. More...
 
void setMaxSpeed (float uMaxSpeed)
 sets the maximum speed for steering More...
 
virtual void setWanderOffset (float uWanderOffset)
 sets the wander offset used for the Wander steering behavior. This represents the distance offset between the pursuer and the wander target More...
 
virtual void setWanderRadius (float uWanderRadius)
 sets the wander circle radius for the Wander steering behavior More...
 
virtual void setWanderRate (float uWanderRate)
 sets the rate for the random number for wander target position More...
 

Additional Inherited Members

- Protected Attributes inherited from U4DEngine::U4DSteering
float maxSpeed
 maximum speed for steering
 

Detailed Description

The U4DFollowPath class implements AI steering Path Following behavior.

Member Function Documentation

◆ getCurrentPathIndex()

int U4DEngine::U4DFollowPath::getCurrentPathIndex ( )
virtual

gets the current path the pursuer is following

Returns
index in the path(segment) vector

Reimplemented from U4DEngine::U4DSteering.

◆ getSteering()

U4DVector3n U4DEngine::U4DFollowPath::getSteering ( U4DDynamicAction uAction,
std::vector< U4DSegment > &  uPathContainer 
)
virtual

Computes the velociry for steering along the provided path.

Parameters
uActionDynamic action represented as the pursuer
uPathContainersegment vector representing the path the pursuer must follow
Returns
velocity vector to apply to 3D model

Reimplemented from U4DEngine::U4DSteering.

◆ setPathOffset()

void U4DEngine::U4DFollowPath::setPathOffset ( float  uPathOffset)
virtual

set the distance along the path to generate the target position

Parameters
uPathOffsetpath offset

Reimplemented from U4DEngine::U4DSteering.

◆ setPathRadius()

void U4DEngine::U4DFollowPath::setPathRadius ( float  uPathRadius)
virtual

set the path radius

Parameters
uPathRadiusradius of path

Reimplemented from U4DEngine::U4DSteering.

◆ setPredictTime()

void U4DEngine::U4DFollowPath::setPredictTime ( float  uPredictTime)
virtual

sets the time in the future to predict the position

Parameters
uPredictTimetime value

Reimplemented from U4DEngine::U4DSteering.