diff options
| author | aura <nw@moneybot.cc> | 2026-02-27 10:08:07 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-27 10:08:07 +0100 |
| commit | 66561ea2fb7f76c408c08e21132e58914329faba (patch) | |
| tree | e02e5c7ff51563a35417bdfe70af568db53896f1 /src/util/aabb.h | |
| parent | b24f37279bcc4b3abd92b697eadcec1feba8d276 (diff) | |
more movement
Diffstat (limited to 'src/util/aabb.h')
| -rw-r--r-- | src/util/aabb.h | 16 |
1 files changed, 0 insertions, 16 deletions
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 }; -} |
