Lines Matching refs:scene
17 // the scene was ray traced correctly.
60 // flog/scene.js
298 Flog.RayTracer.Scene = Class.create();
300 Flog.RayTracer.Scene.prototype = {
642 renderScene: function(scene, canvas){
659 var ray = scene.camera.getRay(xp, yp);
661 var color = this.getPixelColor(ray, scene);
667 throw new Error("Scene rendered incorrectly");
671 getPixelColor: function(ray, scene){
672 var info = this.testIntersection(ray, scene, null);
674 var color = this.rayTrace(info, ray, scene, 0);
677 return scene.background.color;
680 testIntersection: function(ray, scene, exclude){
685 for(var i=0; i<scene.shapes.length; i++){
686 var shape = scene.shapes[i];
709 rayTrace: function(info, ray, scene, depth){
711 var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
715 for(var i=0; i<scene.lights.length; i++){
716 var light = scene.lights[i];
747 var refl = this.testIntersection(reflectionRay, scene, info.shape);
750 refl.color = this.rayTrace(refl, reflectionRay, scene, depth + 1);
752 refl.color = scene.background.color;
773 shadowInfo = this.testIntersection(shadowRay, scene, info.shape);
789 scene.camera.position,
812 var scene = new Flog.RayTracer.Scene();
814 scene.camera = new Flog.RayTracer.Camera(
820 scene.background = new Flog.RayTracer.Background(
862 scene.shapes.push(plane);
863 scene.shapes.push(sphere);
864 scene.shapes.push(sphere1);
877 scene.lights.push(light);
878 scene.lights.push(light1);
903 raytracer.renderScene(scene, null, 0);