We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7109ada + 68acd11 commit 04ece80Copy full SHA for 04ece80
Sources/Rendering/OpenGL/ImageResliceMapper/index.js
@@ -1246,14 +1246,18 @@ function vtkOpenGLImageResliceMapper(publicAPI, model) {
1246
shaders.Fragment = FSSource;
1247
};
1248
1249
+ /**
1250
+ * Returns true if the normal is almost axis aligned.
1251
+ * Has a side effect to normalize the vector.
1252
+ */
1253
function isVectorAxisAligned(n) {
1254
vtkMath.normalize(n);
1255
const tmpN = [0, 0, 0];
1256
for (let i = 0; i < 3; ++i) {
1257
vec3.zero(tmpN);
1258
tmpN[i] = 1.0;
1259
const dotP = vtkMath.dot(n, tmpN);
- if (dotP < -0.999 || dotP > 0.999) {
1260
+ if (dotP < -0.999999 || dotP > 0.999999) {
1261
return [true, i];
1262
}
1263
0 commit comments