Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
AICharacter Class Reference
Inheritance diagram for AICharacter:

## 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.
Public Member Functions inherited from ReferenceCount
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.
Public Member Functions inherited from MemoryBase
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
Public Attributes inherited from ReferenceCount
| get_ref_count
| Returns the current reference count.

## Additional Inherited Members
Static Public Member Functions inherited from ReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()

## Detailed Description

Definition at line 29 of file aiCharacter.h.

## Constructor & Destructor Documentation

## ◆ AICharacter()

AICharacter::AICharacter | ( | std::string | model_name,
|  | NodePath | model_np,
|  | double | mass,
|  | double | movt_force,
|  | double | max_force )
| explicit

Definition at line 16 of file aiCharacter.cxx.

## ◆ ~AICharacter()

AICharacter::~AICharacter | ( |  | ) |

Definition at line 35 of file aiCharacter.cxx.

## Member Function Documentation

## ◆ get_ai_behaviors()

AIBehaviors * AICharacter::get_ai_behaviors | ( |  | ) |

Definition at line 108 of file aiCharacter.cxx.

## ◆ get_char_render()

NodePath AICharacter::get_char_render | ( |  | ) |

Definition at line 116 of file aiCharacter.cxx.

## ◆ get_mass()

double AICharacter::get_mass | ( |  | ) |

Definition at line 84 of file aiCharacter.cxx.

## ◆ get_max_force()

double AICharacter::get_max_force | ( |  | ) |

Definition at line 92 of file aiCharacter.cxx.

## ◆ get_node_path()

NodePath AICharacter::get_node_path | ( |  | ) |

Definition at line 100 of file aiCharacter.cxx.

## ◆ get_velocity()

LVecBase3 AICharacter::get_velocity | ( |  | ) |

Definition at line 76 of file aiCharacter.cxx.

## ◆ set_char_render()

void AICharacter::set_char_render | ( | NodePath | render | ) |

Definition at line 112 of file aiCharacter.cxx.

## ◆ set_mass()

void AICharacter::set_mass | ( | double | m | ) |

Definition at line 88 of file aiCharacter.cxx.

## ◆ set_max_force()

void AICharacter::set_max_force | ( | double | max_force | ) |

Definition at line 96 of file aiCharacter.cxx.

## ◆ set_node_path()

void AICharacter::set_node_path | ( | NodePath | np | ) |

Definition at line 104 of file aiCharacter.cxx.

## ◆ set_pf_guide()

void AICharacter::set_pf_guide | ( | bool | pf_guide | ) |

Definition at line 124 of file aiCharacter.cxx.

## ◆ set_velocity()

void AICharacter::set_velocity | ( | LVecBase3 | vel | ) |

Definition at line 80 of file aiCharacter.cxx.

## ◆ update()

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.

Referenced by AIWorld::update().

## Member Data Documentation

## ◆ _ai_char_flock_id

unsigned int AICharacter::_ai_char_flock_id

Definition at line 37 of file aiCharacter.h.

## ◆ _ai_char_np

NodePath AICharacter::_ai_char_np

Definition at line 41 of file aiCharacter.h.

## ◆ _mass

double AICharacter::_mass

Definition at line 31 of file aiCharacter.h.

## ◆ _max_force

double AICharacter::_max_force

Definition at line 32 of file aiCharacter.h.

## ◆ _movt_force

double AICharacter::_movt_force

Definition at line 36 of file aiCharacter.h.

## ◆ _name

std::string AICharacter::_name

Definition at line 35 of file aiCharacter.h.

## ◆ _pf_guide

bool AICharacter::_pf_guide

Definition at line 42 of file aiCharacter.h.

## ◆ _steering

AIBehaviors* AICharacter::_steering

Definition at line 39 of file aiCharacter.h.

## ◆ _steering_force

LVecBase3 AICharacter::_steering_force

Definition at line 34 of file aiCharacter.h.

## ◆ _velocity

LVecBase3 AICharacter::_velocity

Definition at line 33 of file aiCharacter.h.

## ◆ _window_render

NodePath AICharacter::_window_render

Definition at line 40 of file aiCharacter.h.

## ◆ _world

AIWorld* AICharacter::_world

Definition at line 38 of file aiCharacter.h.

## ◆ get_name

std::string AICharacter::get_name

Definition at line 71 of file aiCharacter.h.

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

- contrib/src/ai/aiCharacter.h
- contrib/src/ai/aiCharacter.cxx