Lines Matching refs:normal
128 var normal = cross(edge1, edge2);
129 if (Math.abs(normal[0]) > Math.abs(normal[1]))
130 if (Math.abs(normal[0]) > Math.abs(normal[2]))
135 if (Math.abs(normal[1]) > Math.abs(normal[2]))
146 this.normal = normalise(normal);
147 this.nu = normal[u] / normal[this.axis];
148 this.nv = normal[v] / normal[this.axis];
149 this.nd = dot(normal, p1) / normal[this.axis];
203 var normal = closest.normal;
205 if (dot(dir, normal) > 0)
206 normal = [-normal[0], -normal[1], -normal[2]];
218 var reflection = addVector(scale(normal, -2*dot(dir, normal)), dir);
233 var nl = dot(normal, toLight);
362 // var angle = 1-dot(view, tri.normal);