Panda3D
Loading...
Searching...
No Matches
Arrival Class Reference

Public Member Functions

 Arrival (AICharacter *ai_ch, double distance=10.0)
 
void arrival_activate ()
 This function checks for whether the target is within the arrival distance.
 
LVecBase3 do_arrival ()
 This function performs the arrival and returns an arrival force which is used in the calculate_prioritized function.
 

Public Attributes

AICharacter_ai_char
 
LVecBase3 _arrival_direction
 
double _arrival_distance
 
bool _arrival_done
 
NodePath _arrival_target
 
LVecBase3 _arrival_target_pos
 
bool _arrival_type
 

Detailed Description

Definition at line 22 of file arrival.h.

Constructor & Destructor Documentation

◆ Arrival()

Arrival::Arrival ( AICharacter * ai_ch,
double distance = 10.0 )

Definition at line 19 of file arrival.cxx.

◆ ~Arrival()

Arrival::~Arrival ( )

Definition at line 26 of file arrival.cxx.

Member Function Documentation

◆ arrival_activate()

void Arrival::arrival_activate ( )

This function checks for whether the target is within the arrival distance.

When this is true, it calls the do_arrival function and sets the arrival direction. This function is not to be used by the user.

Definition at line 92 of file arrival.cxx.

◆ do_arrival()

LVecBase3 Arrival::do_arrival ( )

This function performs the arrival and returns an arrival force which is used in the calculate_prioritized function.

In case the steering force = 0, it resets to arrival_activate. The arrival behavior works only when seek or pursue is active. This function is not to be used by the user.

Definition at line 35 of file arrival.cxx.

Member Data Documentation

◆ _ai_char

AICharacter* Arrival::_ai_char

Definition at line 25 of file arrival.h.

◆ _arrival_direction

LVecBase3 Arrival::_arrival_direction

Definition at line 30 of file arrival.h.

◆ _arrival_distance

double Arrival::_arrival_distance

Definition at line 29 of file arrival.h.

◆ _arrival_done

bool Arrival::_arrival_done

Definition at line 31 of file arrival.h.

◆ _arrival_target

NodePath Arrival::_arrival_target

Definition at line 27 of file arrival.h.

◆ _arrival_target_pos

LVecBase3 Arrival::_arrival_target_pos

Definition at line 28 of file arrival.h.

◆ _arrival_type

bool Arrival::_arrival_type

Definition at line 35 of file arrival.h.


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