14 #ifndef COLLISIONHANDLERPHYSICAL_H 15 #define COLLISIONHANDLERPHYSICAL_H 44 bool remove_collider(
const NodePath &collider);
45 bool has_collider(
const NodePath &collider)
const;
46 void clear_colliders();
48 INLINE
void set_center(
const NodePath ¢er);
49 INLINE
void clear_center();
50 INLINE
const NodePath &get_center()
const;
51 INLINE
bool has_center()
const;
52 INLINE
bool has_contact()
const;
55 MAKE_PROPERTY2(center, has_center, get_center, set_center, clear_center);
64 INLINE
void set_target(
const NodePath &target,
66 INLINE
void updated_transform();
72 virtual bool handle_entries()=0;
73 virtual void apply_linear_force(ColliderDef &def,
const LVector3 &force)=0;
75 virtual bool validate_target(
const NodePath &target);
79 FromEntries _from_entries;
90 static void init_type() {
91 CollisionHandlerEvent::init_type();
93 CollisionHandlerEvent::get_class_type());
96 return get_class_type();
98 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool end_group()
Called by the CollisionTraverser at the completion of all collision detections for this traversal.
This is a TFormer, similar to Trackball, that moves around a transform matrix in response to mouse in...
virtual void begin_group()
Will be called by the CollisionTraverser before a new traversal is begun.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for a number of CollisionHandlers that have some physical effect on their mov...
This is our own Panda specialization on the default STL vector.
Defines a single collision event.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A specialized kind of CollisionHandler that throws an event for each collision detected.
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...
virtual void add_entry(CollisionEntry *entry)
Called between a begin_group() .