18INLINE
bool CollisionHandlerEvent::SortEntries::
22 if (compare_from != 0) {
23 return compare_from < 0;
33INLINE
void CollisionHandlerEvent::SortEntries::
34operator = (
const CollisionHandlerEvent::SortEntries &) {
77 _in_patterns.push_back(in_pattern);
97 return _in_patterns.size();
106 nassertr(n >= 0 && n < (
int)_in_patterns.size(), std::string());
107 return _in_patterns[n];
115 _again_patterns.clear();
132 _again_patterns.push_back(again_pattern);
152 return _again_patterns.size();
161 nassertr(n >= 0 && n < (
int)_again_patterns.size(), std::string());
162 return _again_patterns[n];
170 _out_patterns.clear();
185 _out_patterns.push_back(out_pattern);
205 return _out_patterns.size();
214 nassertr(n >= 0 && n < (
int)_out_patterns.size(), std::string());
215 return _out_patterns[n];
Defines a single collision event.
get_from_node_path
Returns the NodePath that represents the CollisionNode that contains the CollisionSolid that triggere...
get_into_node_path
Returns the NodePath that represents the specific CollisionNode or GeomNode instance that was collide...
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 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...
get_in_pattern
Returns the nth pattern string that indicates how the event names are generated for each collision de...
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...
get_num_out_patterns
Returns the number of in pattern strings that have been added.