From b8a31e08692f9b249b6b45a0c1dc37483ceaafcd Mon Sep 17 00:00:00 2001 From: Geoffrey Irons Date: Sun, 18 Apr 2021 12:51:44 +1200 Subject: Created a method to retrieve the SharedShape from a collider In my case this is for creating a compound shape from a set of existing colliders --- src/geometry/collider.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index 2b08a96..f6417fc 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -244,6 +244,11 @@ impl Collider { self.shape = shape; } + /// Retrieve the SharedShape. Also see the `shape()` function + pub fn shared_shape(&self) -> &SharedShape { + &self.shape + } + /// Compute the axis-aligned bounding box of this collider. pub fn compute_aabb(&self) -> AABB { self.shape.compute_aabb(&self.position) -- cgit