Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1135 - in trunk: Model/Primitives scenes


Chronological Thread 
  • From: knolla@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1135 - in trunk: Model/Primitives scenes
  • Date: Sun, 2 Jul 2006 21:35:30 -0600 (MDT)

Author: knolla
Date: Sun Jul  2 21:35:30 2006
New Revision: 1135

Modified:
   trunk/Model/Primitives/OctreeVolume.cc
   trunk/scenes/octisovol.cc
Log:
added macro hack for changing isovalues; different scene background and 
lighting for octisovol.

Modified: trunk/Model/Primitives/OctreeVolume.cc
==============================================================================
--- trunk/Model/Primitives/OctreeVolume.cc      (original)
+++ trunk/Model/Primitives/OctreeVolume.cc      Sun Jul  2 21:35:30 2006
@@ -17,6 +17,8 @@
 using namespace Manta;
 using namespace SCIRun;
 
+#define START_ISOVAL 20
+
 #define narrow_range(val, rmin, rmax) \
        val = MAX(rmin, val);\
        val = MIN(rmax, val);\
@@ -28,7 +30,7 @@
 
 OctreeVolume::OctreeVolume(char* filebase)
 {
-    isoval = 90;
+    isoval = START_ISOVAL;
     read_file(filebase);
 }
 
@@ -48,7 +50,7 @@
     
     current_timestep = 0;
     
-    isoval = 90;
+    isoval = START_ISOVAL;
     
     //read in the octree data from .oth, .otd files
     {

Modified: trunk/scenes/octisovol.cc
==============================================================================
--- trunk/scenes/octisovol.cc   (original)
+++ trunk/scenes/octisovol.cc   Sun Jul  2 21:35:30 2006
@@ -133,7 +133,8 @@
        Manta::BBox bounds; 
     
     //Material* mat1 = new Phong(Color(RGBColor(0.05f, 0.3f, 0.6f)), 
Color(RGBColor(1.f, 1.f, 1.f)), 50);
-    Material* mat1 = new Lambertian(Color(RGBColor(0.05f, 0.3f, 0.6f)));
+    Material* mat1 = new Lambertian(Color(RGBColor(0.05f, 0.3f, 0.6f)));     
 //blue
+    //Material* mat1 = new Lambertian(Color(RGBColor(0.8f, 0.4f, 1.f)));     
 //purple   
     IsosurfaceOctreeVolume* iov = new IsosurfaceOctreeVolume(ov, mat1);
     bounds = iov->getBounds();
     group->add(iov);
@@ -155,13 +156,16 @@
     //NOTE: this will create a light directly "above" the volume in the +up 
direction.
     //  Some volumes (e.g. heptane) will require us to change this to a -
        LightSet *lights = new LightSet();
-    lights->add( new PointLight( Vector(lookat + (10.f * lookat.length()) * 
up ), Color(RGBColor(1,1,1)) ) );
+    float ldist = 10.f * (lookat-eye).length();
+    //lights->add( new PointLight( Vector(lookat + ldist*(eye - 2*up)), 
Color(RGBColor(0.8,0.8,0.8)) ) );
+    lights->add( new PointLight( Vector(lookat + ldist*up), 
Color(RGBColor(1,1,1)) ) );
        lights->setAmbientLight( new ConstantAmbient( 
Color(RGBColor(0.4,0.5,0.5) ) ));
        scene->setLights(lights);
 
        
        // Background.
     scene->setBackground( new ConstantBackground( Color(RGB(.96, 0.96, 
0.97)) ) );
+    //scene->setBackground( new ConstantBackground( Color(RGB(0,0,0)) ) );
        
        return scene;
 }




  • [MANTA] r1135 - in trunk: Model/Primitives scenes, knolla, 07/02/2006

Archive powered by MHonArc 2.6.16.

Top of page