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
This commit is contained in:
Geoffrey Irons
2021-04-18 12:51:44 +12:00
parent aaf80bfa87
commit b8a31e0869

View File

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