19 KY_INLINE
static void GetSegment2(
const Vec2f& OA,
const Vec2f& OB,
const Vec2f& axis,
KyFloat32& xmin,
KyFloat32& xmax)
23 xmin = Kaim::Min(a, b);
24 xmax = Kaim::Max(a, b);
27 KY_INLINE
static void GetSegment2(
const Vec2LL& OA,
const Vec2LL& OB,
const Vec2LL& axis,
KyInt64& xmin,
KyInt64& xmax)
29 const KyInt64 a = DotProduct(OA, axis);
30 const KyInt64 b = DotProduct(OB, axis);
31 xmin = Kaim::FastMin(a, b);
32 xmax = Kaim::FastMax(a, b);
35 KY_INLINE
static void Get2(
const Vec2f& A,
const Vec2f& B,
const Vec2f& O,
const Vec2f& axis,
KyFloat32& xmin,
KyFloat32& xmax) { GetSegment2(A - O, B - O, axis, xmin, xmax); }
36 KY_INLINE
static void Get2(
const Vec2LL& A,
const Vec2LL& B,
const Vec2LL& O,
const Vec2LL& axis,
KyInt64& xmin,
KyInt64& xmax) { GetSegment2(A - O, B - O, axis, xmin, xmax); }
38 KY_INLINE
static void Get3(
const Vec2f& A,
const Vec2f& B,
const Vec2f& C,
const Vec2f& O,
const Vec2f& axis,
KyFloat32& xmin,
KyFloat32& xmax)
40 const KyFloat32 a = DotProduct(A - O, axis);
41 const KyFloat32 b = DotProduct(B - O, axis);
42 const KyFloat32 c = DotProduct(C - O, axis);
43 xmin = Kaim::Min(a, b, c);
44 xmax = Kaim::Max(a, b, c);
47 KY_INLINE
static void Get3(
const Vec2LL& A,
const Vec2LL& B,
const Vec2LL& C,
const Vec2LL& O,
const Vec2LL& axis,
KyInt64& xmin,
KyInt64& xmax)
49 const KyInt64 a = DotProduct(A - O, axis);
50 const KyInt64 b = DotProduct(B - O, axis);
51 const KyInt64 c = DotProduct(C - O, axis);
52 xmin = Kaim::FastMin(a, b, c);
53 xmax = Kaim::FastMax(a, b, c);
56 KY_INLINE
static void Get4(
const Vec2f& A,
const Vec2f& B,
const Vec2f& C,
const Vec2f& D,
const Vec2f& O,
const Vec2f& axis,
KyFloat32& xmin,
KyFloat32& xmax)
58 const KyFloat32 a = DotProduct(A - O, axis);
59 const KyFloat32 b = DotProduct(B - O, axis);
60 const KyFloat32 c = DotProduct(C - O, axis);
61 const KyFloat32 d = DotProduct(D - O, axis);
62 xmin = Kaim::Min(a, b, c, d);
63 xmax = Kaim::Max(a, b, c, d);
66 KY_INLINE
static void Get4(
const Vec2LL& A,
const Vec2LL& B,
const Vec2LL& C,
const Vec2LL& D,
const Vec2LL& O,
const Vec2LL& axis,
KyInt64& xmin,
KyInt64& xmax)
68 const KyInt64 a = DotProduct(A - O, axis);
69 const KyInt64 b = DotProduct(B - O, axis);
70 const KyInt64 c = DotProduct(C - O, axis);
71 const KyInt64 d = DotProduct(D - O, axis);
72 xmin = Kaim::FastMin(a, b, c, d);
73 xmax = Kaim::FastMax(a, b, c, d);
76 KY_INLINE
static void Get4(
const Vec2i& A,
const Vec2i& B,
const Vec2i& C,
const Vec2i& D,
const Vec2i& O,
const Vec2i& axis,
KyInt32& xmin,
KyInt32& xmax)
78 const KyInt32 a = DotProduct(A - O, axis);
79 const KyInt32 b = DotProduct(B - O, axis);
80 const KyInt32 c = DotProduct(C - O, axis);
81 const KyInt32 d = DotProduct(D - O, axis);
82 xmin = Kaim::FastMin(a, b, c, d);
83 xmax = Kaim::FastMax(a, b, c, d);
86 KY_INLINE
static void Get1AndOrig(
const Vec2f& A,
const Vec2f& O,
const Vec2f& axis,
KyFloat32& xmin,
KyFloat32& xmax)
88 const KyFloat32 a = DotProduct(A - O, axis);
89 xmin = Kaim::Min(a, 0.0f);
90 xmax = Kaim::Max(a, 0.0f);
93 KY_INLINE
static void Get1AndOrig(
const Vec2LL& A,
const Vec2LL& O,
const Vec2LL& axis,
KyInt64& xmin,
KyInt64& xmax)
95 const KyInt64 a = DotProduct(A - O, axis);
96 xmin = Kaim::FastMin(a, 0LL);
97 xmax = Kaim::FastMax(a, 0LL);
100 KY_INLINE
static void Get2AndOrig(
const Vec2f& A,
const Vec2f& B,
const Vec2f& O,
const Vec2f& axis,
KyFloat32& xmin,
KyFloat32& xmax)
102 const KyFloat32 a = DotProduct(A - O, axis);
103 const KyFloat32 b = DotProduct(B - O, axis);
104 xmin = Kaim::Min(a, b, 0.0f);
105 xmax = Kaim::Max(a, b, 0.0f);
std::int64_t KyInt64
int64_t
Definition: types.h:25
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
std::int32_t KyInt32
int32_t
Definition: types.h:24
float KyFloat32
float
Definition: types.h:32