14#ifndef COLLISIONHANDLEREVENT_H
15#define COLLISIONHANDLEREVENT_H
72 EXTENSION(PyObject *__reduce__(PyObject *self)
const);
73 EXTENSION(
void __setstate__(PyObject *self, vector_uchar data));
79 void throw_event_for(
const vector_string &patterns,
CollisionEntry *entry);
80 void throw_event_pattern(
const std::string &pattern,
CollisionEntry *entry);
82 vector_string _in_patterns;
83 vector_string _again_patterns;
84 vector_string _out_patterns;
93 INLINE
void operator = (
const SortEntries &other);
97 Colliding _current_colliding;
98 Colliding _last_colliding;
104 static void init_type() {
105 CollisionHandler::init_type();
107 CollisionHandler::get_class_type());
109 virtual TypeHandle get_type()
const {
110 return get_class_type();
112 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
115 static TypeHandle _type_handle;
Defines a single collision event.
void set_out_pattern(const std::string &out_pattern)
This method is deprecated; it completely replaces all the in patterns that have previously been set w...
void add_out_pattern(const std::string &out_pattern)
Adds the pattern string that indicates how the event names are generated when a collision between two...
get_num_again_patterns
Returns the number of in pattern strings that have been added.
void clear_again_patterns()
Removes all of the previously-added in patterns.
get_again_pattern
Returns the nth pattern string that indicates how the event names are generated for each collision de...
void clear_out_patterns()
Removes all of the previously-added in patterns.
void add_again_pattern(const std::string &again_pattern)
Adds the pattern string that indicates how the event names are generated when a collision between two...
get_out_pattern
Returns the nth pattern string that indicates how the event names are generated for each collision de...
get_num_in_patterns
Returns the number of in pattern strings that have been added.
void add_in_pattern(const std::string &in_pattern)
Adds a pattern string to the list of events that will be generated in response to a collision.
void clear_in_patterns()
Removes all of the previously-added in patterns.
void flush()
Same as clear() except "out" events are thrown.
void set_in_pattern(const std::string &in_pattern)
This method is deprecated; it completely replaces all the in patterns that have previously been set w...
CollisionHandlerEvent()
The default CollisionHandlerEvent will throw no events.
get_in_pattern
Returns the nth pattern string that indicates how the event names are generated for each collision de...
void read_datagram(DatagramIterator &source)
Restores the object state from the given datagram, previously obtained using __getstate__.
void set_again_pattern(const std::string &again_pattern)
This method is deprecated; it completely replaces all the in patterns that have previously been set w...
void clear()
Empties the list of elements that all colliders are known to be colliding with.
get_num_out_patterns
Returns the number of in pattern strings that have been added.
void write_datagram(Datagram &destination) const
Serializes this object, to implement pickle support.
virtual bool end_group()
Called by the CollisionTraverser at the completion of all collision detections for this traversal.
virtual void begin_group()
Will be called by the CollisionTraverser before a new traversal is begun.
virtual void add_entry(CollisionEntry *entry)
Called between a begin_group() .
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
TypeHandle is the identifier used to differentiate C++ class types.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.