Home | History | Annotate | Download | only in benchmarks

Lines Matching refs:Ray

1 // The ray tracer code in this file is written by Adam Burmister. It
9 // JavaScript framework which is used by the ray tracer.
17 // the scene was ray traced correctly.
53 // The rest of this file is the actual ray tracer written by Adam
59 // flog/ray.js
280 Flog.RayTracer.Ray = Class.create();
282 Flog.RayTracer.Ray.prototype = {
291 return 'Ray [' + this.position + ',' + this.direction + ']';
426 intersect: function(ray){
430 var dst = Flog.RayTracer.Vector.prototype.subtract(ray.position, this.position);
432 var B = dst.dot(ray.direction);
440 ray.position,
442 ray.direction,
478 intersect: function(ray){
481 var Vd = this.position.dot(ray.direction);
484 var t = -(this.position.dot(ray.position) + this.d) / Vd;
490 ray.position,
492 ray.direction,
574 var ray = new Flog.RayTracer.Ray(pos, dir.normalize());
576 return ray;
580 return 'Ray []';
659 var ray = scene.camera.getRay(xp, yp);
661 var color = this.getPixelColor(ray, scene);
671 getPixelColor: function(ray, scene){
672 var info = this.testIntersection(ray, scene, null);
674 var color = this.rayTrace(info, ray, scene, 0);
680 testIntersection: function(ray, scene, exclude){
689 var info = shape.intersect(ray);
706 return new Flog.RayTracer.Ray(P, R1);
709 rayTrace: function(info, ray, scene, depth){
743 // calculate reflection ray
746 var reflectionRay = this.getReflectionRay(info.position, info.normal, ray.direction);
771 var shadowRay = new Flog.RayTracer.Ray(info.position, v);