Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
RayAABox8.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <Jolt/Math/Vec8.h>
9
11
15{
16 // Constants
19
20 // Origin
24
25 // Parallel
29
30 // Inverse direction
34
35 // Test against all three axii simultaneously.
42
43 // Compute the max of min(t1,t2) and the min of max(t1,t2) ensuring we don't
44 // use the results from any directions parallel to the slab.
51
52 // t_min.xyz = maximum(t_min.x, t_min.y, t_min.z);
54
55 // t_max.xyz = minimum(t_max.x, t_max.y, t_max.z);
57
58 // if (t_min > t_max) return FLT_MAX;
60
61 // if (t_max < 0.0f) return FLT_MAX;
63
64 // if bounds are invalid return FLOAT_MAX;
67
68 // if (inInvDirection.mIsParallel && !(Min <= inOrigin && inOrigin <= Max)) return FLT_MAX; else return t_min;
74}
75
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
AllocateFunction Allocate
Definition Memory.cpp:59
JPH_NAMESPACE_BEGIN JPH_INLINE Vec8 RayAABox8(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec8Arg inBoundsMinX, Vec8Arg inBoundsMinY, Vec8Arg inBoundsMinZ, Vec8Arg inBoundsMaxX, Vec8Arg inBoundsMaxY, Vec8Arg inBoundsMaxZ)
Definition RayAABox8.h:14
Helper structure holding the reciprocal of a ray for Ray vs AABox testing.
Definition RayAABox.h:11
Definition UVec8.h:12
static JPH_INLINE UVec8 sSplatZ(UVec4Arg inV)
Replicate the Z component of inV to all components.
Definition UVec8.inl:32
static JPH_INLINE UVec8 sAnd(UVec8Arg inV1, UVec8Arg inV2)
Logical and.
Definition UVec8.inl:61
static JPH_INLINE UVec8 sSplatY(UVec4Arg inV)
Replicate the Y component of inV to all components.
Definition UVec8.inl:27
static JPH_INLINE UVec8 sSplatX(UVec4Arg inV)
Replicate the X component of inV to all components.
Definition UVec8.inl:22
static JPH_INLINE UVec8 sOr(UVec8Arg inV1, UVec8Arg inV2)
Logical or.
Definition UVec8.inl:51
Definition Vec3.h:16
Definition Vec4.h:14
Definition Vec8.h:12
static JPH_INLINE UVec8 sLess(Vec8Arg inV1, Vec8Arg inV2)
Less than.
Definition Vec8.inl:63
static JPH_INLINE Vec8 sSplatX(Vec4Arg inV)
Replicate the X component of inV to all components.
Definition Vec8.inl:24
static JPH_INLINE Vec8 sSplatY(Vec4Arg inV)
Replicate the Y component of inV to all components.
Definition Vec8.inl:29
static JPH_INLINE Vec8 sMax(Vec8Arg inV1, Vec8Arg inV2)
Component wise max.
Definition Vec8.inl:58
static JPH_INLINE UVec8 sGreater(Vec8Arg inV1, Vec8Arg inV2)
Greater than.
Definition Vec8.inl:68
static JPH_INLINE Vec8 sZero()
Vector with all zeros.
Definition Vec8.inl:14
static JPH_INLINE Vec8 sSelect(Vec8Arg inV1, Vec8Arg inV2, UVec8Arg inControl)
Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of in...
Definition Vec8.inl:48
static JPH_INLINE Vec8 sMin(Vec8Arg inV1, Vec8Arg inV2)
Component wise min.
Definition Vec8.inl:53
static JPH_INLINE Vec8 sSplatZ(Vec4Arg inV)
Replicate the Z component of inV to all components.
Definition Vec8.inl:34
static JPH_INLINE Vec8 sReplicate(float inV)
Replicate across all components.
Definition Vec8.inl:19