Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r877 - trunk/scenes


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r877 - trunk/scenes
  • Date: Tue, 31 Jan 2006 12:17:14 -0700 (MST)

Author: sparker
Date: Tue Jan 31 12:17:13 2006
New Revision: 877

Modified:
   trunk/scenes/cube.cc
Log:
Dramatically simplify cube.cc


Modified: trunk/scenes/cube.cc
==============================================================================
--- trunk/scenes/cube.cc        (original)
+++ trunk/scenes/cube.cc        Tue Jan 31 12:17:13 2006
@@ -1,4 +1,5 @@
 
+#include <Core/Color/ColorDB.h>
 #include <Core/Geometry/PointVector.h>
 #include <Core/Exceptions/IllegalArgument.h>
 #include <Core/Util/Args.h>
@@ -34,6 +35,8 @@
 using namespace Manta;
 using namespace std;
 
+<<<<<<< .mine
+=======
 static const double SCALE = 1./3.;
 static const double BV_RADIUS = 1.0;
 
@@ -144,22 +147,15 @@
         */
 }
 
+>>>>>>> .r875
 extern "C" 
 Scene* make_scene(const ReadContext& context, const vector<string>& args)
 {
-  int scenesize=2;
-  double light_radius=0.8;
   int argc = static_cast<int>(args.size());
   Group* world = 0;
   for(int i=0;i<argc;i++){
     string arg = args[i];
-    if(arg == "-size"){
-      if(!getIntArg(i, args, scenesize))
-       throw IllegalArgument("scene 0 -size", i, args);
-    } else if(arg == "-light"){
-      if(!getDoubleArg(i, args, light_radius))
-       throw IllegalArgument("scene 0 -light", i, args);
-    } else if(arg == "-bv"){
+    if(arg == "-bv"){
       string s;
       if(!getStringArg(i, args, s))
         throw IllegalArgument("scene 0 -bv", i, args);
@@ -174,32 +170,19 @@
 
   if(!world)
     world = new Group();
+  
+  // Simple Materials
+  Material* matl0=new Lambertian(Color(RGB(.4,.4,.4)));
+  Material* matl1=new Lambertian(ColorDB::getNamedColor("sky blue"));
        
-  NOT_FINISHED("scene 0");
-  make_obj(world, scenesize);
+  // Add a simple box to the scene
+  //world->add( new Cube( matl0, Point(-1,-1,-1), Point(1,1,1) ) );
+  world->add(new Sphere( matl1, Point(0.0,0.0,0.00), 1.0 ) );
        
-#if 0
-  Camera cam(Point(1.8,-5.53,1.25), Point(0.0,-.13,1.22),
-            Vector(0,0,1), 28.2);
-
-  double ambient_scale=1.0;
-  Color bgcolor(RGB(0.1, 0.2, 0.45));
-  Color cdown(RGB(0.82, 0.62, 0.62));
-  Color cup(RGB(0.1, 0.3, 0.8));
-  
-
-  rtrt::Plane groundplane ( Point(0, 0, 0), Vector(0, 0, 300) );
-  Scene* scene=new Scene(obj, cam,
-                        bgcolor, cdown, cup, groundplane,
-                        ambient_scale, Arc_Ambient);
-  
-  scene->select_shadow_mode( Single_Soft_Shadow );
-#endif
   Scene* scene = new Scene();
-  scene->setBackground(new ConstantBackground(Color::white()));
+  scene->setBackground(new ConstantBackground(ColorDB::getNamedColor("light 
slate gray")));
   scene->setObject(world);
 
-  NOT_FINISHED("soft shadows/area lights for scene 0");
   LightSet* lights = new LightSet();
   lights->add(new PointLight(Point(5,-3,3), Color(RGB(1,1,.8))*2));
   Color cup(RGB(0.1, 0.3, 0.8));




  • [MANTA] r877 - trunk/scenes, sparker, 01/31/2006

Archive powered by MHonArc 2.6.16.

Top of page