Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1161)

Unified Diff: samples/o3d-webgl/primitive.js

Issue 3013067: o3d-webgl: Fixes picking edge case where two components of the world ray are both 0. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/primitive.js
===================================================================
--- samples/o3d-webgl/primitive.js (revision 55475)
+++ samples/o3d-webgl/primitive.js (working copy)
@@ -525,7 +525,7 @@
(m00 * m12 - m02 * m10) * y +
(m00 * m11 - m01 * m10) * z) / d;
- if (v0 > 0 && v1 > 0 && v2 > 0) {
+ if (v0 >= 0 && v1 >= 0 && v2 >= 0 && (v0 + v1 + v2 > 0)) {
// Rescale by the one-norm to find the intersection of the transformed.
// ray with the unit triangle.
var one_norm = v0 + v1 + v2;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698