diff options
| author | Geoffrey Irons <sdfgeoff@gmail.com> | 2021-04-18 12:51:44 +1200 |
|---|---|---|
| committer | Geoffrey Irons <sdfgeoff@gmail.com> | 2021-04-18 12:51:44 +1200 |
| commit | b8a31e08692f9b249b6b45a0c1dc37483ceaafcd (patch) | |
| tree | 18443fb62ba5659575f50b2487df3b1595c8c51e /src | |
| parent | aaf80bfa872c6f29b248cab8eb5658ab0d73cb4a (diff) | |
| download | rapier-b8a31e08692f9b249b6b45a0c1dc37483ceaafcd.tar.gz rapier-b8a31e08692f9b249b6b45a0c1dc37483ceaafcd.tar.bz2 rapier-b8a31e08692f9b249b6b45a0c1dc37483ceaafcd.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/geometry/collider.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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) |
