Merge pull request #176 from sdfgeoff/add_collider_shared_shape_method

Created a method to retrieve the SharedShape from a collider
This commit is contained in:
Sébastien Crozet
2021-06-02 17:32:56 +02:00
committed by GitHub

View File

@@ -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)