Combine contact events and intersection events into a single event type and flags

This commit is contained in:
Sébastien Crozet
2022-03-19 17:52:56 +01:00
committed by Sébastien Crozet
parent a9e3441ecd
commit 063c638ec5
12 changed files with 101 additions and 103 deletions

View File

@@ -86,12 +86,10 @@ type Callbacks =
#[allow(dead_code)]
impl Harness {
pub fn new_empty() -> Self {
let contact_channel = crossbeam::channel::unbounded();
let proximity_channel = crossbeam::channel::unbounded();
let event_handler = ChannelEventCollector::new(proximity_channel.0, contact_channel.0);
let event_channel = crossbeam::channel::unbounded();
let event_handler = ChannelEventCollector::new(event_channel.0);
let events = PhysicsEvents {
contact_events: contact_channel.1,
intersection_events: proximity_channel.1,
events: event_channel.1,
};
let physics = PhysicsState::new();
let state = RunState::new();