5#if defined(__x86_64__) || defined(_M_X64)
35 dimZ = 2; dimX = 1; dimY = 0;
39 dimZ = 0; dimX = 1; dimY = 2;
47 dimZ = 1; dimX = 0; dimY = 2;
51 dimZ = 0; dimX = 1; dimY = 2;
60 dimZ = 1; dimX = 0; dimY = 2;
64 dimZ = 2; dimX = 0; dimY = 1;
77 dimZ = 0; dimX = 2; dimY = 1;
81 dimZ = 1; dimX = 2; dimY = 0;
89 dimZ = 2; dimX = 1; dimY = 0;
93 dimZ = 1; dimX = 2; dimY = 0;
102 dimZ = 0; dimX = 2; dimY = 1;
106 dimZ = 2; dimX = 0; dimY = 1;
115struct IntersectionPrecomputes
135 sign.
x = dir.
x >= T( 0 ) ? 1 : 0;
136 sign.
y = dir.
y >= T( 0 ) ? 1 : 0;
137 sign.
z = dir.
z >= T( 0 ) ? 1 : 0;
143 invDir.
x = ( dir.
x == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
x;
144 invDir.y = ( dir.
y == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
y;
145 invDir.z = ( dir.
z == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
z;
151#if defined(__x86_64__) || defined(_M_X64)
153struct IntersectionPrecomputes<float>
175 ( dir.x == 0 ) ? std::numeric_limits<float>::max() : 1 / dir.x,
176 ( dir.y == 0 ) ? std::numeric_limits<float>::max() : 1 / dir.y,
177 ( dir.z == 0 ) ? std::numeric_limits<float>::max() : 1 / dir.z,
186 #pragma message("IntersectionPrecomputes<float>: no hardware optimized instructions")
int idxY
Definition MRIntersectionPrecomputes.h:123
T Sx
precomputed factors
Definition MRIntersectionPrecomputes.h:129
Vector3i sign
stores signs of direction vector;
Definition MRIntersectionPrecomputes.h:126
int idxX
Definition MRIntersectionPrecomputes.h:122
Vector3< T > invDir
Definition MRIntersectionPrecomputes.h:118
T Sz
Definition MRIntersectionPrecomputes.h:129
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:24
IntersectionPrecomputes()=default
IntersectionPrecomputes(const Vector3< T > &dir)
Definition MRIntersectionPrecomputes.h:131
T Sy
Definition MRIntersectionPrecomputes.h:129
int maxDimIdxZ
Definition MRIntersectionPrecomputes.h:121
Definition MRCameraOrientationPlugin.h:8
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