15 #ifndef CollisionHandlerGravity_H 16 #define CollisionHandlerGravity_H 18 #include "pandabase.h" 20 #include "collisionHandlerPhysical.h" 36 INLINE
void set_offset(PN_stdfloat offset);
37 INLINE PN_stdfloat get_offset()
const;
39 INLINE
void set_reach(PN_stdfloat reach);
40 INLINE PN_stdfloat get_reach()
const;
42 INLINE PN_stdfloat get_airborne_height()
const;
43 INLINE
bool is_on_ground()
const;
44 INLINE PN_stdfloat get_impact_velocity()
const;
45 INLINE
const LVector3 &get_contact_normal()
const;
47 INLINE
void add_velocity(PN_stdfloat velocity);
48 INLINE
void set_velocity(PN_stdfloat velocity);
49 INLINE PN_stdfloat get_velocity()
const;
51 INLINE
void set_gravity(PN_stdfloat gravity);
52 INLINE PN_stdfloat get_gravity()
const;
54 INLINE
void set_max_velocity(PN_stdfloat max_vel);
55 INLINE PN_stdfloat get_max_velocity()
const;
57 INLINE
void set_legacy_mode(
bool legacy_mode);
58 INLINE
bool get_legacy_mode()
const;
61 PN_stdfloat set_highest_collision(
const NodePath &target_node_path,
const NodePath &from_node_path,
const Entries &entries);
62 virtual bool handle_entries();
63 virtual void apply_linear_force(ColliderDef &def,
const LVector3 &force);
68 PN_stdfloat _airborne_height;
69 PN_stdfloat _impact_velocity;
71 PN_stdfloat _current_velocity;
72 PN_stdfloat _max_velocity;
81 static void init_type() {
82 CollisionHandlerPhysical::init_type();
83 register_type(_type_handle,
"CollisionHandlerGravity",
84 CollisionHandlerPhysical::get_class_type());
87 return get_class_type();
89 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
95 #include "collisionHandlerGravity.I" A specialized kind of CollisionHandler that sets the Z height of the collider to a fixed linear offse...
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
The abstract base class for a number of CollisionHandlers that have some physical effect on their mov...
TypeHandle is the identifier used to differentiate C++ class types.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...