Panda3D
Public Member Functions | Public Attributes

Arrival Class Reference

List of all members.

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.
LVecBase3f 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
LVecBase3f _arrival_direction
double _arrival_distance
bool _arrival_done
NodePath _arrival_target
LVecBase3f _arrival_target_pos
bool _arrival_type

Detailed Description

Definition at line 24 of file arrival.h.


Member Function Documentation

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 100 of file arrival.cxx.

References NodePath::get_pos(), AIBehaviors::is_on(), LVecBase3f::length(), AIBehaviors::pause_ai(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().

Referenced by AIBehaviors::calculate_prioritized().

LVecBase3f 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 39 of file arrival.cxx.

References NodePath::get_pos(), LVecBase3f::length(), LVecBase3f::normalize(), AIBehaviors::resume_ai(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().

Referenced by AIBehaviors::calculate_prioritized().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations