From 66561ea2fb7f76c408c08e21132e58914329faba Mon Sep 17 00:00:00 2001 From: aura Date: Fri, 27 Feb 2026 10:08:07 +0100 Subject: more movement --- src/util/aabb.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/util/aabb.h') diff --git a/src/util/aabb.h b/src/util/aabb.h index 4d74c88..96e40bf 100644 --- a/src/util/aabb.h +++ b/src/util/aabb.h @@ -13,19 +13,3 @@ inline F32 aabb_support_radius( const AABB& aabb, const VEC3& dir ) { VEC3 half = aabb_half( aabb ); return fabsf(dir.x) * half.x + fabsf(dir.y) * half.y + fabsf(dir.z) * half.z; } - -// returns positive radius in X and negative in Y -inline VEC2 aabb_extend_at_feet( const AABB& aabb, const VEC3& dir ) { - VEC3 half = aabb_half( aabb ); - - F32 hx = half.x; - F32 hy = half.y; - F32 hz = half.z * 2; - - F32 lateral = fabsf( dir.x ) * hx + fabsf( dir.y ) * hy; - - F32 pos_z = dir.z > 0 ? dir.z * hz : 0.f; - F32 neg_z = dir.z < 0 ? (-dir.z) * hz : 0.f; - - return { lateral + pos_z, lateral + neg_z }; -} -- cgit v1.2.3