Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2249 - trunk/scenes


Chronological Thread 
  • From: roni@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2249 - trunk/scenes
  • Date: Mon, 5 May 2008 21:09:14 -0600 (MDT)

Author: roni
Date: Mon May  5 21:09:14 2008
New Revision: 2249

Modified:
   trunk/scenes/primtest.cc
Log:
M    scenes/primtest.cc:

Added option for constant background ("-constantbg").


Modified: trunk/scenes/primtest.cc
==============================================================================
--- trunk/scenes/primtest.cc    (original)
+++ trunk/scenes/primtest.cc    Mon May  5 21:09:14 2008
@@ -87,6 +87,7 @@
   bool set_primtype = false;
   bool bgpoly = true;
   bool bgpoly_first = false;
+  bool constant_background = false;
   for(size_t i=0;i<args.size();i++){
     string arg = args[i];
     if(arg == "-scale"){
@@ -117,6 +118,9 @@
       bgpoly = false;
     } else if(arg == "-bgpolyfirst"){
       bgpoly_first = true;
+    }
+    else if(arg == "-constantbg"){
+      constant_background = true;
     } else {
       if(arg[0] == '-' || set_primtype) {
         cerr << "Valid options for scene primtest:\n";
@@ -620,9 +624,15 @@
 #endif
   }
   Scene* scene = new Scene();
-  scene->setBackground(new LinearBackground(Color(RGB(0.2, 0.4, 0.9)),
-                                            Color(RGB(0.0,0.0,0.0)),
-                                            Vector(0,1,0)));
+  if(constant_background){
+    scene->setBackground(new ConstantBackground(Color(RGB(0.6, 0.6, 0.6))));
+  }
+  else{
+    scene->setBackground(new LinearBackground(Color(RGB(0.2, 0.4, 0.9)),
+                                              Color(RGB(0.0,0.0,0.0)),
+                                              Vector(0,1,0)));
+  }
+
   scene->setObject(group);
 
   LightSet* lights = new LightSet();





Archive powered by MHonArc 2.6.16.

Top of page