21 if( std::abs( dir.
x ) >= std::abs( dir.
y ) )
34struct IntersectionPrecomputes2
53 sign.x = dir.
x >= T( 0 ) ? 1 : 0;
54 sign.y = dir.
y >= T( 0 ) ? 1 : 0;
59 invDir.
x = ( dir.
x == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
x;
60 invDir.y = ( dir.
y == 0 ) ? std::numeric_limits<T>::max() : T( 1 ) / dir.
y;
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
Definition MRCameraOrientationPlugin.h:8
int idxX
Definition MRIntersectionPrecomputes2.h:41
T Sy
Definition MRIntersectionPrecomputes2.h:47
IntersectionPrecomputes2(const Vector2< T > &dir)
Definition MRIntersectionPrecomputes2.h:49
T Sx
precomputed factors
Definition MRIntersectionPrecomputes2.h:47
Vector2i sign
stores signs of direction vector;
Definition MRIntersectionPrecomputes2.h:44
IntersectionPrecomputes2()=default
int maxDimIdxY
Definition MRIntersectionPrecomputes2.h:40
Vector2< T > invDir
Definition MRIntersectionPrecomputes2.h:37
Definition MRVector2.h:18
T x
Definition MRVector2.h:24
T y
Definition MRVector2.h:24