We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14f5885 commit 84758ebCopy full SHA for 84758eb
1 file changed
src/object/fluid.rs
@@ -165,6 +165,12 @@ impl Fluid {
165
self.positions.len()
166
}
167
168
+ /// Computes the AABB of this fluid.
169
+ pub fn compute_aabb(&self, particle_radius: Real) -> parry::bounding_volume::Aabb {
170
+ use parry::bounding_volume::{details::local_point_cloud_aabb, BoundingVolume};
171
+ local_point_cloud_aabb(&self.positions).loosened(particle_radius)
172
+ }
173
+
174
/// The mass of the `i`-th particle of this fluid.
175
pub fn particle_mass(&self, i: usize) -> Real {
176
self.volumes[i] * self.density0
0 commit comments