Panda3D
|
Public Member Functions | |
AICharacter (std::string model_name, NodePath model_np, double mass, double movt_force, double max_force) | |
AIBehaviors * | get_ai_behaviors () |
NodePath | get_char_render () |
double | get_mass () |
double | get_max_force () |
std::string | get_name () |
NodePath | get_node_path () |
LVecBase3 | get_velocity () |
void | set_char_render (NodePath render) |
void | set_mass (double m) |
void | set_max_force (double max_force) |
void | set_node_path (NodePath np) |
void | set_pf_guide (bool pf_guide) |
void | set_velocity (LVecBase3 vel) |
void | update () |
Each character's update will update its AI and physics based on his resultant steering force. | |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
Public Attributes | |
unsigned int | _ai_char_flock_id |
NodePath | _ai_char_np |
double | _mass |
double | _max_force |
double | _movt_force |
std::string | _name |
bool | _pf_guide |
AIBehaviors * | _steering |
LVecBase3 | _steering_force |
LVecBase3 | _velocity |
NodePath | _window_render |
AIWorld * | _world |
get_name | |
![]() | |
get_ref_count | |
Returns the current reference count. | |
Additional Inherited Members | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Definition at line 29 of file aiCharacter.h.
|
explicit |
Definition at line 16 of file aiCharacter.cxx.
AICharacter::~AICharacter | ( | ) |
Definition at line 35 of file aiCharacter.cxx.
AIBehaviors * AICharacter::get_ai_behaviors | ( | ) |
Definition at line 108 of file aiCharacter.cxx.
NodePath AICharacter::get_char_render | ( | ) |
Definition at line 116 of file aiCharacter.cxx.
double AICharacter::get_mass | ( | ) |
Definition at line 84 of file aiCharacter.cxx.
double AICharacter::get_max_force | ( | ) |
Definition at line 92 of file aiCharacter.cxx.
NodePath AICharacter::get_node_path | ( | ) |
Definition at line 100 of file aiCharacter.cxx.
LVecBase3 AICharacter::get_velocity | ( | ) |
Definition at line 76 of file aiCharacter.cxx.
void AICharacter::set_char_render | ( | NodePath | render | ) |
Definition at line 112 of file aiCharacter.cxx.
void AICharacter::set_mass | ( | double | m | ) |
Definition at line 88 of file aiCharacter.cxx.
void AICharacter::set_max_force | ( | double | max_force | ) |
Definition at line 96 of file aiCharacter.cxx.
void AICharacter::set_node_path | ( | NodePath | np | ) |
Definition at line 104 of file aiCharacter.cxx.
void AICharacter::set_pf_guide | ( | bool | pf_guide | ) |
Definition at line 124 of file aiCharacter.cxx.
void AICharacter::set_velocity | ( | LVecBase3 | vel | ) |
Definition at line 80 of file aiCharacter.cxx.
void AICharacter::update | ( | ) |
Each character's update will update its AI and physics based on his resultant steering force.
This also makes the character look in the direction of the force.
Definition at line 44 of file aiCharacter.cxx.
References AIBehaviors::calculate_prioritized(), NodePath::get_pos(), AIBehaviors::is_off(), and NodePath::look_at().
Referenced by AIWorld::update().
unsigned int AICharacter::_ai_char_flock_id |
Definition at line 37 of file aiCharacter.h.
NodePath AICharacter::_ai_char_np |
Definition at line 41 of file aiCharacter.h.
double AICharacter::_mass |
Definition at line 31 of file aiCharacter.h.
double AICharacter::_max_force |
Definition at line 32 of file aiCharacter.h.
double AICharacter::_movt_force |
Definition at line 36 of file aiCharacter.h.
std::string AICharacter::_name |
Definition at line 35 of file aiCharacter.h.
bool AICharacter::_pf_guide |
Definition at line 42 of file aiCharacter.h.
AIBehaviors* AICharacter::_steering |
Definition at line 39 of file aiCharacter.h.
LVecBase3 AICharacter::_steering_force |
Definition at line 34 of file aiCharacter.h.
LVecBase3 AICharacter::_velocity |
Definition at line 33 of file aiCharacter.h.
NodePath AICharacter::_window_render |
Definition at line 40 of file aiCharacter.h.
AIWorld* AICharacter::_world |
Definition at line 38 of file aiCharacter.h.
std::string AICharacter::get_name |
Definition at line 71 of file aiCharacter.h.