Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r869 - in trunk: fox/FManta scenes


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r869 - in trunk: fox/FManta scenes
  • Date: Wed, 25 Jan 2006 22:31:08 -0700 (MST)

Author: abe
Date: Wed Jan 25 22:31:08 2006
New Revision: 869

Modified:
   trunk/fox/FManta/FMantaTransparent.cc
   trunk/scenes/boeing777.cc
Log:


Added -solidwire option.
M    scenes/boeing777.cc

Fixed dialog order problem. Now opaque kdtree loads by default.
M    fox/FManta/FMantaTransparent.cc


Modified: trunk/fox/FManta/FMantaTransparent.cc
==============================================================================
--- trunk/fox/FManta/FMantaTransparent.cc       (original)
+++ trunk/fox/FManta/FMantaTransparent.cc       Wed Jan 25 22:31:08 2006
@@ -37,8 +37,7 @@
        render_mode_box->appendItem( "Opaque Surfaces", 0, kdtree );
        render_mode_box->appendItem( "Transparent Surfaces", 0, 
transparent_kdtree );
 
-       // Transparent by default
-       render_mode_box->setCurrentItem( 1 );
+       render_mode_box->setCurrentItem( 0 );
        
        // Add alpha slider.
        frame = new FXHorizontalFrame( this, LAYOUT_FILL_X );
@@ -52,8 +51,8 @@
        alpha_slider->setRange( 0.0, 1.0 );
        alpha_slider->setValue( transparent_kdtree->getAlpha() );
 
-       // Transparent by default
-       // alpha_slider->disable();
+       if (render_mode_box->getCurrentItem()==0)
+    alpha_slider->disable();
        
 }
 

Modified: trunk/scenes/boeing777.cc
==============================================================================
--- trunk/scenes/boeing777.cc   (original)
+++ trunk/scenes/boeing777.cc   Wed Jan 25 22:31:08 2006
@@ -80,6 +80,7 @@
                         MTL_AMBIENT,
                         MTL_FLAT,
                         MTL_NORMAL,
+                        MTL_SOLID_WIRE,
                         MTL_WIRE,
                         MTL_RAYDIRECTION };
 enum TraversalType    { TRAVERSAL_SINGLE, TRAVERSAL_VERTICAL };
@@ -150,6 +151,9 @@
     else if (args[i] == "-wire") {
       material_type = MTL_WIRE;
     }
+    else if (args[i] == "-solidwire") {
+      material_type = MTL_SOLID_WIRE;
+    }    
     else if (args[i] == "-raydirection") {
       material_type = MTL_RAYDIRECTION;
     }
@@ -182,7 +186,8 @@
       cerr << "-ambient <max dist> <secondary rays>"  << endl;
       cerr << "-normal   -- Use normal material.\n";
       cerr << "-flat\n";
-      cerr << "-wire\n";
+      cerr << "-wire\n    -- wireframe only";
+      cerr << "-solidwire -- wireframe on shaded surfaces\n";
       cerr << "-raydirection\n";
       cerr << "-bg marble  Currently only marble is supported.\n";
       cerr << "Traversals:------------------------------------\n";
@@ -220,8 +225,14 @@
   case MTL_RAYDIRECTION:
     kd_material = new Lambertian( new 
WireframeTexture<KDTree::ScratchPadInfo>( new RaySignTexture(), Color(RGB(0, 
0, 0)) ) );
     break;
+  case MTL_SOLID_WIRE:
+    kd_material = new Phong( new WireframeTexture<KDTree::ScratchPadInfo>( 
new KDTreeTexture(), Color(RGB(0, 0, 0)) ),
+                             new Constant<Color>(Color::white()),
+                             512,
+                             new Constant<float>(0) );
+    break;    
   case MTL_WIRE:
-    kd_material = new Transparent( new NormalTexture(), new 
WireframeTexture<KDTree::ScratchPadInfo,ColorComponent>( (ColorComponent)0.1, 
(ColorComponent)1.0) );
+    kd_material = new Transparent( new KDTreeTexture(), new 
WireframeTexture<KDTree::ScratchPadInfo,ColorComponent>( (ColorComponent)0.1, 
(ColorComponent)1.0) );
     break;
   };
        




  • [MANTA] r869 - in trunk: fox/FManta scenes, abe, 01/25/2006

Archive powered by MHonArc 2.6.16.

Top of page