aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/proximity.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-01-29 14:42:32 +0100
committerGitHub <noreply@github.com>2021-01-29 14:42:32 +0100
commit7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c (patch)
tree3781b9d7c92a6a8111573ba4cae1c5d41435950e /src/geometry/proximity.rs
parente6fc8f67faf3e37afe38d683cbd930d457f289be (diff)
parent825f33efaec4ce6a8903751e836a0ea9c466ff92 (diff)
downloadrapier-7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c.tar.gz
rapier-7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c.tar.bz2
rapier-7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c.zip
Merge pull request #79 from dimforge/split_geom
Move most of the geometric code to another crate.
Diffstat (limited to 'src/geometry/proximity.rs')
-rw-r--r--src/geometry/proximity.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/geometry/proximity.rs b/src/geometry/proximity.rs
deleted file mode 100644
index d3e0dc4..0000000
--- a/src/geometry/proximity.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use crate::geometry::proximity_detector::ProximityPhase;
-use crate::geometry::{ColliderPair, Proximity};
-use std::any::Any;
-
-#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
-/// The description of the proximity of two colliders.
-pub struct ProximityPair {
- /// The pair of collider involved.
- pub pair: ColliderPair,
- /// The state of proximity between the two colliders.
- pub proximity: Proximity,
- #[cfg_attr(feature = "serde-serialize", serde(skip))]
- pub(crate) detector: Option<ProximityPhase>,
- #[cfg_attr(feature = "serde-serialize", serde(skip))]
- pub(crate) detector_workspace: Option<Box<dyn Any + Send + Sync>>,
-}
-
-// TODO: use the `derive(Clone)` instead?
-impl Clone for ProximityPair {
- fn clone(&self) -> Self {
- ProximityPair {
- pair: self.pair.clone(),
- proximity: self.proximity.clone(),
- detector: None,
- detector_workspace: None,
- }
- }
-}
-
-impl ProximityPair {
- pub(crate) fn new(
- pair: ColliderPair,
- detector: ProximityPhase,
- detector_workspace: Option<Box<dyn Any + Send + Sync>>,
- ) -> Self {
- Self {
- pair,
- proximity: Proximity::Disjoint,
- detector: Some(detector),
- detector_workspace,
- }
- }
-}