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

The U4DNavigation class determines the path for the 3D model to navigate. More...

Public Member Functions

 U4DNavigation ()
 class constructor
 
 ~U4DNavigation ()
 class destructor
 
bool loadNavMesh (const char *uNavMeshName, const char *uBlenderFile)
 loads the navigation mesh imported from blender More...
 
void computePath (U4DDynamicAction *uAction, U4DVector3n &uTargetPosition)
 computes the path using the provided starting and target positions More...
 
U4DVector3n getSteering (U4DDynamicAction *uAction)
 Computes the velocity for steering. 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...
 
void setTargetRadius (float uTargetRadius)
 sets the radius distance to the target where the velocity of the pursuer should come to a stop More...
 
void setSlowRadius (float uSlowRadius)
 sets the radius distance to the target where the pursuer should slow down More...
 
void setNavigationSpeed (float uNavigationSpeed)
 sets the navigation speed for the pursuer More...
 
U4DNavMeshgetNavMesh ()
 get pointer to navigation mesh object. This object contains the navigation mesh nodes
 
std::vector< U4DSegmentgetNavPath ()
 get navigation path
 

Detailed Description

The U4DNavigation class determines the path for the 3D model to navigate.

Member Function Documentation

◆ computePath()

void U4DEngine::U4DNavigation::computePath ( U4DDynamicAction uAction,
U4DVector3n uTargetPosition 
)

computes the path using the provided starting and target positions

Parameters
uActionDynamic action representing the pursuer
uTargetPositiontarget position

◆ getSteering()

U4DVector3n U4DEngine::U4DNavigation::getSteering ( U4DDynamicAction uAction)

Computes the velocity for steering.

Parameters
uActionDynamic action represented as the pursuer
Returns
velocity vector to apply to 3D model

◆ loadNavMesh()

bool U4DEngine::U4DNavigation::loadNavMesh ( const char *  uNavMeshName,
const char *  uBlenderFile 
)

loads the navigation mesh imported from blender

Parameters
uNavMeshNamename of navigation mesh as specified in blender 3D
uBlenderFilename of file
Returns
true if the nav mesh was properly loaded

◆ setNavigationSpeed()

void U4DEngine::U4DNavigation::setNavigationSpeed ( float  uNavigationSpeed)

sets the navigation speed for the pursuer

Parameters
uNavigationSpeednavigation speed

◆ setPathOffset()

void U4DEngine::U4DNavigation::setPathOffset ( float  uPathOffset)

set the distance along the path to generate the target position

Parameters
uPathOffsetpath offset

◆ setPathRadius()

void U4DEngine::U4DNavigation::setPathRadius ( float  uPathRadius)

set the path radius

Parameters
uPathRadiusradius of path

◆ setPredictTime()

void U4DEngine::U4DNavigation::setPredictTime ( float  uPredictTime)

sets the time in the future to predict the position

Parameters
uPredictTimetime value

◆ setSlowRadius()

void U4DEngine::U4DNavigation::setSlowRadius ( float  uSlowRadius)

sets the radius distance to the target where the pursuer should slow down

Parameters
uSlowRadiusradius of circle to slow down

◆ setTargetRadius()

void U4DEngine::U4DNavigation::setTargetRadius ( float  uTargetRadius)

sets the radius distance to the target where the velocity of the pursuer should come to a stop

Parameters
uTargetRadiusradius of circle to stop