add defaults for the several structs
This commit is contained in:
committed by
Sébastien Crozet
parent
1608a1323e
commit
536122e080
@@ -33,6 +33,12 @@ impl ColliderPair {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ColliderPair{
|
||||
fn default() -> Self {
|
||||
ColliderPair::zero()
|
||||
}
|
||||
}
|
||||
|
||||
/// An event emitted by the broad-phase.
|
||||
pub enum BroadPhasePairEvent {
|
||||
/// A potential new collision pair has been detected by the broad-phase.
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::pipeline::{ActiveEvents, ActiveHooks};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
/// The unique identifier of a collider added to a collider set.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Default)]
|
||||
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
|
||||
#[repr(transparent)]
|
||||
pub struct ColliderHandle(pub crate::data::arena::Index);
|
||||
|
||||
@@ -24,7 +24,7 @@ use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Default)]
|
||||
struct ColliderGraphIndices {
|
||||
contact_graph_index: ColliderGraphIndex,
|
||||
intersection_graph_index: ColliderGraphIndex,
|
||||
|
||||
Reference in New Issue
Block a user