Browse Source

adding flush()

Josh Wilson 18 years ago
parent
commit
5b105d3968

+ 11 - 0
panda/src/collide/collisionHandlerEvent.cxx

@@ -162,6 +162,17 @@ clear() {
   _current_colliding.clear();
   _current_colliding.clear();
 }
 }
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: CollisionHandlerEvent::flush
+//       Access: Public
+//  Description: Same as clear() except "out" events are thrown.
+////////////////////////////////////////////////////////////////////
+void CollisionHandlerEvent::
+flush() {
+  begin_group();
+  end_group();
+}
+
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: CollisionHandlerEvent::throw_event_for
 //     Function: CollisionHandlerEvent::throw_event_for
 //       Access: Private
 //       Access: Private

+ 1 - 0
panda/src/collide/collisionHandlerEvent.h

@@ -66,6 +66,7 @@ PUBLISHED:
   INLINE string get_out_pattern(int n) const;
   INLINE string get_out_pattern(int n) const;
 
 
   void clear();
   void clear();
+  void flush();
 
 
 protected:
 protected:
   void throw_event_for(const vector_string &patterns, CollisionEntry *entry);
   void throw_event_for(const vector_string &patterns, CollisionEntry *entry);