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

The U4DFlock class implements AI steering separation behavior. More...

Public Member Functions

 U4DFlock ()
 class construtor
 
 ~U4DFlock ()
 class destructor
 
U4DVector3n getSteering (U4DDynamicAction *uPursuer, std::vector< U4DDynamicAction * > uNeighborsContainer)
 Computes the velocity for steering. More...
 
void setMaxSpeed (float uMaxSpeed)
 sets the maximum speed for steering More...
 
void setNeighborsDistance (float uNeighborSeparationDistance, float uNeighborAlignDistance, float uNeighborCohesionDistance)
 Sets the corresponding separation, alignment and cohesion neighbor distance. More...
 

Detailed Description

The U4DFlock class implements AI steering separation behavior.

Member Function Documentation

◆ getSteering()

U4DVector3n U4DEngine::U4DFlock::getSteering ( U4DDynamicAction uPursuer,
std::vector< U4DDynamicAction * >  uNeighborsContainer 
)

Computes the velocity for steering.

Parameters
uPursuerDynamic action represented as the pursuer
uNeighborsContainerneighbors container
Returns
velocity vector to apply to 3D model

◆ setMaxSpeed()

void U4DEngine::U4DFlock::setMaxSpeed ( float  uMaxSpeed)

sets the maximum speed for steering

Parameters
uMaxSpeedmaximum steering speed

◆ setNeighborsDistance()

void U4DEngine::U4DFlock::setNeighborsDistance ( float  uNeighborSeparationDistance,
float  uNeighborAlignDistance,
float  uNeighborCohesionDistance 
)

Sets the corresponding separation, alignment and cohesion neighbor distance.

Parameters
uNeighborSeparationDistanceDistance for neighbor separation
uNeighborAlignDistanceDistance for neighbor alignment
uNeighborCohesionDistanceDistance for neighbor cohesion