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

Method centroid

splashsurf_lib/src/aabb.rs:210–212  ·  view source on GitHub ↗

Returns the geometric centroid of the AABB (mean of the corner points)

(&self)

Source from the content-addressed store, hash-verified

208
209 /// Returns the geometric centroid of the AABB (mean of the corner points)
210 pub fn centroid(&self) -> SVector<R, D> {
211 self.min + (self.extents() / (R::one() + R::one()))
212 }
213
214 /// Checks if the given AABB is inside the AABB, the AABB is considered to be half-open to its max coordinate
215 pub fn contains_aabb(&self, other: &Self) -> bool {

Callers 4

center_at_originMethod · 0.80
scale_uniformlyMethod · 0.80
enclosing_cubeMethod · 0.80
is_region_supportedMethod · 0.80

Calls 1

extentsMethod · 0.80

Tested by

no test coverage detected