MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / grow_uniformly

Method grow_uniformly

splashsurf_lib/src/aabb.rs:257–260  ·  view source on GitHub ↗

Grows this AABB uniformly in all directions by the given scalar margin (i.e. adding the margin to min/max extents)

(&mut self, margin: R)

Source from the content-addressed store, hash-verified

255
256 /// Grows this AABB uniformly in all directions by the given scalar margin (i.e. adding the margin to min/max extents)
257 pub fn grow_uniformly(&mut self, margin: R) {
258 self.min -= SVector::repeat(margin);
259 self.max += SVector::repeat(margin);
260 }
261
262 /// Returns the smallest cubical AABB with the same center that encloses this AABB
263 pub fn enclosing_cube(&self) -> Self {

Calls

no outgoing calls