4#include "MRPch/MRBindingMacros.h"
6#if defined(__x86_64__) || defined(_M_X64)
36 dimZ = 2; dimX = 1; dimY = 0;
40 dimZ = 0; dimX = 1; dimY = 2;
48 dimZ = 1; dimX = 0; dimY = 2;
52 dimZ = 0; dimX = 1; dimY = 2;
61 dimZ = 1; dimX = 0; dimY = 2;
65 dimZ = 2; dimX = 0; dimY = 1;
78 dimZ = 0; dimX = 2; dimY = 1;
82 dimZ = 1; dimX = 2; dimY = 0;
90 dimZ = 2; dimX = 1; dimY = 0;
94 dimZ = 1; dimX = 2; dimY = 0;
103 dimZ = 0; dimX = 2; dimY = 1;
107 dimZ = 2; dimX = 0; dimY = 1;
116struct IntersectionPrecomputes
136 sign.x = dir.
x >= T( 0 ) ? 1 : 0;
137 sign.y = dir.
y >= T( 0 ) ? 1 : 0;
138 sign.z = dir.
z >= T( 0 ) ? 1 : 0;
144 invDir.
x = ( dir.
x == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
x;
145 invDir.y = ( dir.
y == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
y;
146 invDir.z = ( dir.
z == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
z;
152#if defined(__x86_64__) || defined(_M_X64)
154struct IntersectionPrecomputes<float>
157 MR_BIND_IGNORE __m128
invDir;
176 ( dir.x == 0 ) ? std::numeric_limits<float>::max() : 1 / dir.x,
177 ( dir.y == 0 ) ? std::numeric_limits<float>::max() : 1 / dir.y,
178 ( dir.z == 0 ) ? std::numeric_limits<float>::max() : 1 / dir.z,
187 #pragma message("IntersectionPrecomputes<float>: no hardware optimized instructions")
int idxY
Definition MRIntersectionPrecomputes.h:124
T Sx
precomputed factors
Definition MRIntersectionPrecomputes.h:130
Vector3i sign
stores signs of direction vector;
Definition MRIntersectionPrecomputes.h:127
int idxX
Definition MRIntersectionPrecomputes.h:123
Vector3< T > invDir
Definition MRIntersectionPrecomputes.h:119
T Sz
Definition MRIntersectionPrecomputes.h:130
void findMaxVectorDim(int &dimX, int &dimY, int &dimZ, const Vector3< T > &dir)
finds index of maximum axis and stores it into dimZ
Definition MRIntersectionPrecomputes.h:25
IntersectionPrecomputes()=default
IntersectionPrecomputes(const Vector3< T > &dir)
Definition MRIntersectionPrecomputes.h:132
T Sy
Definition MRIntersectionPrecomputes.h:130
int maxDimIdxZ
Definition MRIntersectionPrecomputes.h:122
Definition MRCameraOrientationPlugin.h:8
MRMESH_CLASS Vector3
Definition MRMesh/MRMeshFwd.h:137
Definition MRMesh/MRVector3.h:19
T x
Definition MRMesh/MRVector3.h:25
T y
Definition MRMesh/MRVector3.h:25
T z
Definition MRMesh/MRVector3.h:25