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

Method center_at_origin

splashsurf_lib/src/aabb.rs:231–233  ·  view source on GitHub ↗

Translates the AABB to center it at the coordinate origin (moves the centroid to the coordinate origin)

(&mut self)

Source from the content-addressed store, hash-verified

229
230 /// Translates the AABB to center it at the coordinate origin (moves the centroid to the coordinate origin)
231 pub fn center_at_origin(&mut self) {
232 self.translate(&(self.centroid() * R::one().neg()));
233 }
234
235 /// Multiplies a uniform, local scaling to the AABB (i.e. multiplying its extents as if it was centered at the origin)
236 pub fn scale_uniformly(&mut self, scaling: R) {

Callers

nothing calls this directly

Calls 2

translateMethod · 0.80
centroidMethod · 0.80

Tested by

no test coverage detected