21 Vec3 e1 = inV1 - inV0;
22 Vec3 e2 = inV2 - inV0;
37 Vec3 s = inOrigin - inV0;
52 UVec4 no_intersection =
76JPH_INLINE
Vec4 RayTriangle4(
Vec3Arg inOrigin,
Vec3Arg inDirection,
Vec4Arg inV0X,
Vec4Arg inV0Y,
Vec4Arg inV0Z,
Vec4Arg inV1X,
Vec4Arg inV1Y,
Vec4Arg inV1Z,
Vec4Arg inV2X,
Vec4Arg inV2Y,
Vec4Arg inV2Z)
85 Vec4 e1x = inV1X - inV0X;
86 Vec4 e1y = inV1Y - inV0Y;
87 Vec4 e1z = inV1Z - inV0Z;
88 Vec4 e2x = inV2X - inV0X;
89 Vec4 e2y = inV2Y - inV0Y;
90 Vec4 e2z = inV2Z - inV0Z;
98 Vec4 px = dy * e2z - dz * e2y;
99 Vec4 py = dz * e2x - dx * e2z;
100 Vec4 pz = dx * e2y - dy * e2x;
103 Vec4 det = e1x * px + e1y * py + e1z * pz;
124 Vec4 qx = sy * e1z - sz * e1y;
125 Vec4 qy = sz * e1x - sx * e1z;
126 Vec4 qz = sx * e1y - sy * e1x;
135 UVec4 no_intersection =
#define JPH_NAMESPACE_END
Definition: Core.h:378
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
JPH_NAMESPACE_BEGIN JPH_INLINE float RayTriangle(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2)
Definition: RayTriangle.h:11
JPH_INLINE Vec4 RayTriangle4(Vec3Arg inOrigin, Vec3Arg inDirection, Vec4Arg inV0X, Vec4Arg inV0Y, Vec4Arg inV0Z, Vec4Arg inV1X, Vec4Arg inV1Y, Vec4Arg inV1Z, Vec4Arg inV2X, Vec4Arg inV2Y, Vec4Arg inV2Z)
Intersect ray with 4 triangles in SOA format, returns 4 vector of closest points or FLT_MAX if no hit...
Definition: RayTriangle.h:76
static JPH_INLINE UVec4 sReplicate(uint32 inV)
Replicate int inV across all components.
Definition: UVec4.inl:56
static JPH_INLINE UVec4 sOr(UVec4Arg inV1, UVec4Arg inV2)
Logical or (component wise)
Definition: UVec4.inl:171
JPH_INLINE float Dot(Vec3Arg inV2) const
Dot product.
Definition: Vec3.inl:645
JPH_INLINE Vec4 SplatX() const
Replicate the X component to all components.
Definition: Vec3.inl:529
JPH_INLINE Vec3 Cross(Vec3Arg inV2) const
Cross product.
Definition: Vec3.inl:590
JPH_INLINE float GetX() const
Get individual components.
Definition: Vec3.h:124
JPH_INLINE Vec3 Abs() const
Return the absolute value of each of the components.
Definition: Vec3.inl:572
JPH_INLINE Vec4 SplatZ() const
Replicate the Z component to all components.
Definition: Vec3.inl:551
static JPH_INLINE UVec4 sGreater(Vec3Arg inV1, Vec3Arg inV2)
Greater than (component wise)
Definition: Vec3.inl:222
static JPH_INLINE Vec3 sSelect(Vec3Arg inV1, Vec3Arg inV2, UVec4Arg inControl)
Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of in...
Definition: Vec3.inl:269
JPH_INLINE Vec4 SplatY() const
Replicate the Y component to all components.
Definition: Vec3.inl:540
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition: Vec3.inl:107
static JPH_INLINE UVec4 sLess(Vec3Arg inV1, Vec3Arg inV2)
Less than (component wise)
Definition: Vec3.inl:192
static JPH_INLINE Vec3 sReplicate(float inV)
Replicate inV across all components.
Definition: Vec3.inl:118
static JPH_INLINE UVec4 sGreater(Vec4Arg inV1, Vec4Arg inV2)
Greater than (component wise)
Definition: Vec4.inl:208
static JPH_INLINE Vec4 sAnd(Vec4Arg inV1, Vec4Arg inV2)
Logical and (component wise)
Definition: Vec4.inl:290
static JPH_INLINE Vec4 sXor(Vec4Arg inV1, Vec4Arg inV2)
Logical xor (component wise)
Definition: Vec4.inl:279
static JPH_INLINE UVec4 sLess(Vec4Arg inV1, Vec4Arg inV2)
Less than (component wise)
Definition: Vec4.inl:180
static JPH_INLINE Vec4 sSelect(Vec4Arg inV1, Vec4Arg inV2, UVec4Arg inControl)
Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of in...
Definition: Vec4.inl:254
static JPH_INLINE Vec4 sZero()
Vector with all zeros.
Definition: Vec4.inl:63
static JPH_INLINE Vec4 sReplicate(float inV)
Replicate inV across all components.
Definition: Vec4.inl:74