Lines Matching defs:Scene
12 // the scene was ray traced correctly.
55 // flog/scene.js
299 Flog.RayTracer.Scene = Class.create();
301 Flog.RayTracer.Scene.prototype = {
668 renderScene: function(scene, canvas){
685 var ray = scene.camera.getRay(xp, yp);
687 var color = this.getPixelColor(ray, scene);
693 throw new Error("Scene rendered incorrectly");
697 getPixelColor: function(ray, scene){
698 var info = this.testIntersection(ray, scene, null);
700 var color = this.rayTrace(info, ray, scene, 0);
703 return scene.background.color;
706 testIntersection: function(ray, scene, exclude){
711 for(var i=0; i<scene.shapes.length; i++){
712 var shape = scene.shapes[i];
735 rayTrace: function(info, ray, scene, depth){
737 var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
741 for(var i=0; i<scene.lights.length; i++){
742 var light = scene.lights[i];
773 var refl = this.testIntersection(reflectionRay, scene, info.shape);
776 refl.color = this.rayTrace(refl, reflectionRay, scene, depth + 1);
778 refl.color = scene.background.color;
799 shadowInfo = this.testIntersection(shadowRay, scene, info.shape);
815 scene.camera.position,
838 var scene = new Flog.RayTracer.Scene();
840 scene.camera = new Flog.RayTracer.Camera(
846 scene.background = new Flog.RayTracer.Background(
888 scene.shapes.push(plane);
889 scene.shapes.push(sphere);
890 scene.shapes.push(sphere1);
903 scene.lights.push(light);
904 scene.lights.push(light1);
929 raytracer.renderScene(scene, null, 0);