Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1718 - trunk/scenes/galileo


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1718 - trunk/scenes/galileo
  • Date: Tue, 11 Sep 2007 05:51:00 -0600 (MDT)

Author: boulos
Date: Tue Sep 11 05:50:59 2007
New Revision: 1718

Modified:
   trunk/scenes/galileo/grparse.y
Log:
scenes/galileo/grparse.y

 Fixing the galileo parse scene to no longer support Triangle (which
 no longer exists)


Modified: trunk/scenes/galileo/grparse.y
==============================================================================
--- trunk/scenes/galileo/grparse.y      (original)
+++ trunk/scenes/galileo/grparse.y      Tue Sep 11 05:50:59 2007
@@ -19,7 +19,7 @@
 
   #include <Model/Groups/Group.h>
   #include <Model/Primitives/Parallelogram.h>
-  #include <Model/Primitives/Triangle.h>
+//  #include <Model/Primitives/Triangle.h>
   #include <Model/Materials/Lambertian.h>
   #include <Model/Textures/Constant.h>
 
@@ -49,7 +49,7 @@
 #include <vector>
 #include <map>
 #include <string>

+
  using namespace std;
  using namespace Manta;
 
@@ -63,7 +63,7 @@
  // These will be accessed externally
  Group* world = new Group();
 

+
  struct Params {
    Params()
      {
@@ -83,7 +83,7 @@
    void addVector(string name, vector<Vector>& value) {
      vectors[name] = value;
    }
-   
+
    void addRGBTexture(string name, vector<Texture<Color>*>& value) {
      rgb_textures[name] = value;
    }
@@ -91,13 +91,13 @@
    void addRGB(string name, vector<RGBColor>& value) {
      rgb_colors[name] = value;
    }
-   
+
    map<string, vector<float> > floats;
    map<string, vector<Vector> > vectors;
    map<string, vector<Texture<Color>*> > rgb_textures;
    map<string, vector<RGBColor> > rgb_colors;
  };

+
 Params params;
 
 %}
@@ -789,6 +789,7 @@
                                  /* v1       */ v1,
                                  /* v2       */ v2));
   } else if (strcmp($2, "Triangle") == 0) {
+#if 0
     map<string, vector<Vector> >::iterator found = params.vectors.find("P");
     if (found != params.vectors.end()) {
       size_t num_vectors = (*found).second.size();
@@ -804,10 +805,13 @@
       }
     } else {
       // woot woot
-      fprintf(stderr, "vector base not found for Parallelogram\n");
+      fprintf(stderr, "vector P not found for Triangle\n");
       exit(2);
     }
-    
+#else
+    fprintf(stderr, "Triangle no longer handled\n");
+#endif
+
   } else {
     fprintf(stderr, "Unknown surface object (%s)\n", $2);
   }
@@ -835,7 +839,7 @@
     }
   } else {
     fprintf(stderr, "Unknown surface shader (%s)\n", $3);
-  }  
+  }
 }
 | TEXTURE STRING STRING STRING param_list
 {




  • [Manta] r1718 - trunk/scenes/galileo, boulos, 09/11/2007

Archive powered by MHonArc 2.6.16.

Top of page