94    Vec4 t1x = (inBoundsMinX - originx) * invdirx;
 
   95    Vec4 t1y = (inBoundsMinY - originy) * invdiry;
 
   96    Vec4 t1z = (inBoundsMinZ - originz) * invdirz;
 
   97    Vec4 t2x = (inBoundsMaxX - originx) * invdirx;
 
   98    Vec4 t2y = (inBoundsMaxY - originy) * invdiry;
 
   99    Vec4 t2z = (inBoundsMaxZ - originz) * invdirz;
 
  124    no_intersection = 
UVec4::sOr(no_intersection, bounds_invalid);
 
 
  218    Vec3 extents = inBoundsMax - inBoundsMin;
 
  220    Vec3 diff = 2.0f * inOrigin - inBoundsMin - inBoundsMax;
 
  225    Vec3 abs_dir = inDirection.
Abs();
 
  236    no_intersection = 
UVec4::sOr(no_intersection, 
Vec3::sGreater((inDirection * diff_yzx - dir_yzx * diff).Abs(), extents_xyx * abs_dir_yzz + extents_yzz * abs_dir_xyx));
 
 
#define JPH_NAMESPACE_END
Definition Core.h:419
 
#define JPH_NAMESPACE_BEGIN
Definition Core.h:413
 
JPH_INLINE Vec4 RayAABox4(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec4Arg inBoundsMinX, Vec4Arg inBoundsMinY, Vec4Arg inBoundsMinZ, Vec4Arg inBoundsMaxX, Vec4Arg inBoundsMaxY, Vec4Arg inBoundsMaxZ)
Definition RayAABox.h:72
 
JPH_INLINE bool RayAABoxHits(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax, float inClosest)
Intersect AABB with ray, returns true if there is a hit closer than inClosest.
Definition RayAABox.h:175
 
JPH_INLINE float RayAABox(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax)
Definition RayAABox.h:33
 
@ SWIZZLE_Z
Use the Z component.
Definition Swizzle.h:14
 
@ SWIZZLE_X
Use the X component.
Definition Swizzle.h:12
 
@ SWIZZLE_Y
Use the Y component.
Definition Swizzle.h:13
 
Helper structure holding the reciprocal of a ray for Ray vs AABox testing.
Definition RayAABox.h:11
 
UVec4 mIsParallel
for each component if it is parallel to the coordinate axis
Definition RayAABox.h:28
 
Vec3 mInvDirection
1 / ray direction
Definition RayAABox.h:27
 
RayInvDirection(Vec3Arg inDirection)
Definition RayAABox.h:15
 
RayInvDirection()=default
Constructors.
 
void Set(Vec3Arg inDirection)
Set reciprocal from ray direction.
Definition RayAABox.h:18
 
JPH_INLINE UVec4 SplatY() const
Replicate the Y component to all components.
Definition UVec4.inl:323
 
JPH_INLINE UVec4 SplatX() const
Replicate the X component to all components.
Definition UVec4.inl:312
 
JPH_INLINE bool TestAnyXYZTrue() const
Test if any of X, Y or Z components are true (true is when highest bit of component is set)
Definition UVec4.inl:458
 
static JPH_INLINE UVec4 sAnd(UVec4Arg inV1, UVec4Arg inV2)
Logical and (component wise)
Definition UVec4.inl:202
 
static JPH_INLINE UVec4 sOr(UVec4Arg inV1, UVec4Arg inV2)
Logical or (component wise)
Definition UVec4.inl:174
 
JPH_INLINE UVec4 SplatZ() const
Replicate the Z component to all components.
Definition UVec4.inl:334
 
static JPH_INLINE Vec3 sMax(Vec3Arg inV1, Vec3Arg inV2)
Return the maximum of each of the components.
Definition Vec3.inl:160
 
JPH_INLINE Vec4 SplatX() const
Replicate the X component to all components.
Definition Vec3.inl:534
 
static JPH_INLINE Vec3 sMin(Vec3Arg inV1, Vec3Arg inV2)
Return the minimum value of each of the components.
Definition Vec3.inl:147
 
JPH_INLINE float GetX() const
Get individual components.
Definition Vec3.h:127
 
static JPH_INLINE UVec4 sGreaterOrEqual(Vec3Arg inV1, Vec3Arg inV2)
Greater than or equal (component wise)
Definition Vec3.inl:238
 
static JPH_INLINE UVec4 sLessOrEqual(Vec3Arg inV1, Vec3Arg inV2)
Less than or equal (component wise)
Definition Vec3.inl:208
 
JPH_INLINE Vec3 Abs() const
Return the absolute value of each of the components.
Definition Vec3.inl:577
 
static JPH_INLINE Vec3 sOne()
Vector with all ones.
Definition Vec3.inl:125
 
JPH_INLINE Vec3 Reciprocal() const
Reciprocal vector (1 / value) for each of the components.
Definition Vec3.inl:590
 
JPH_INLINE Vec4 SplatZ() const
Replicate the Z component to all components.
Definition Vec3.inl:556
 
static JPH_INLINE UVec4 sGreater(Vec3Arg inV1, Vec3Arg inV2)
Greater than (component wise)
Definition Vec3.inl:223
 
JPH_INLINE Vec4 SplatY() const
Replicate the Y component to all components.
Definition Vec3.inl:545
 
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition Vec3.inl:103
 
static JPH_INLINE UVec4 sLess(Vec3Arg inV1, Vec3Arg inV2)
Less than (component wise)
Definition Vec3.inl:193
 
static JPH_INLINE Vec3 sReplicate(float inV)
Replicate inV across all components.
Definition Vec3.inl:114
 
static JPH_INLINE Vec3 sSelect(Vec3Arg inNotSet, Vec3Arg inSet, UVec4Arg inControl)
Component wise select, returns inNotSet when highest bit of inControl = 0 and inSet when highest bit ...
Definition Vec3.inl:270
 
JPH_INLINE Vec3 Swizzle() const
Swizzle the elements in inV.
 
static JPH_INLINE UVec4 sGreater(Vec4Arg inV1, Vec4Arg inV2)
Greater than (component wise)
Definition Vec4.inl:218
 
static JPH_INLINE UVec4 sLess(Vec4Arg inV1, Vec4Arg inV2)
Less than (component wise)
Definition Vec4.inl:190
 
static JPH_INLINE Vec4 sMin(Vec4Arg inV1, Vec4Arg inV2)
Return the minimum value of each of the components.
Definition Vec4.inl:143
 
static JPH_INLINE Vec4 sZero()
Vector with all zeros.
Definition Vec4.inl:63
 
static JPH_INLINE Vec4 sMax(Vec4Arg inV1, Vec4Arg inV2)
Return the maximum of each of the components.
Definition Vec4.inl:157
 
static JPH_INLINE Vec4 sSelect(Vec4Arg inNotSet, Vec4Arg inSet, UVec4Arg inControl)
Component wise select, returns inNotSet when highest bit of inControl = 0 and inSet when highest bit ...
Definition Vec4.inl:264
 
static JPH_INLINE Vec4 sReplicate(float inV)
Replicate inV across all components.
Definition Vec4.inl:74