aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2021-06-02 17:32:56 +0200
committerGitHub <noreply@github.com>2021-06-02 17:32:56 +0200
commitad2fcf755a750e279b730c660da438abc2803a9a (patch)
tree7d081128403eea4bd632f14b2834559e49b286dc
parent8a3103a35b2ee5773dda6bb92870d9bfadc6ba70 (diff)
parentb8a31e08692f9b249b6b45a0c1dc37483ceaafcd (diff)
downloadrapier-ad2fcf755a750e279b730c660da438abc2803a9a.tar.gz
rapier-ad2fcf755a750e279b730c660da438abc2803a9a.tar.bz2
rapier-ad2fcf755a750e279b730c660da438abc2803a9a.zip
Merge pull request #176 from sdfgeoff/add_collider_shared_shape_method
Created a method to retrieve the SharedShape from a collider
-rw-r--r--src/geometry/collider.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs
index 0101a09..c039ed5 100644
--- a/src/geometry/collider.rs
+++ b/src/geometry/collider.rs
@@ -246,6 +246,11 @@ impl Collider {
self.co_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.co_shape.compute_aabb(&self.co_pos)