00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00014 00015 #pragma warning (disable:4996) 00016 #pragma warning (disable:4005) 00017 #pragma warning(disable:4275) 00018 00019 00020 #ifndef _AICHARACTER_H 00021 #define _AICHARACTER_H 00022 00023 #include "aiBehaviors.h" 00024 #include "aiWorld.h" 00025 00032 00034 00035 class AIBehaviors; 00036 class AIWorld; 00037 00038 class AICharacter { 00039 public: 00040 double _mass; 00041 double _max_force; 00042 LVecBase3f _velocity; 00043 LVecBase3f _steering_force; 00044 string _name; 00045 double _movt_force; 00046 unsigned int _ai_char_flock_id; 00047 AIWorld *_world; 00048 AIBehaviors *_steering; 00049 NodePath _window_render; 00050 NodePath _ai_char_np; 00051 bool _pf_guide; 00052 00053 void update(); 00054 void set_velocity(LVecBase3f vel); 00055 void set_char_render(NodePath render); 00056 NodePath get_char_render(); 00057 00058 PUBLISHED: 00059 double get_mass(); 00060 void set_mass(double m); 00061 00062 LVecBase3f get_velocity(); 00063 00064 double get_max_force(); 00065 void set_max_force(double max_force); 00066 00067 NodePath get_node_path(); 00068 void set_node_path(NodePath np); 00069 00070 AIBehaviors * get_ai_behaviors(); 00071 00072 // This function is used to enable or disable the guides for path finding. 00073 void set_pf_guide(bool pf_guide); 00074 00075 AICharacter(string model_name, NodePath model_np, double mass, double movt_force, double max_force); 00076 ~AICharacter(); 00077 }; 00078 00079 #endif