Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r405 - in branches/itanium2: Engine/Display Engine/PixelSamplers fox


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r405 - in branches/itanium2: Engine/Display Engine/PixelSamplers fox
  • Date: Tue, 21 Jun 2005 15:31:17 -0600 (MDT)

Author: abe
Date: Tue Jun 21 15:31:13 2005
New Revision: 405

Modified:
   branches/itanium2/Engine/Display/FileDisplay.cc
   branches/itanium2/Engine/PixelSamplers/JitterSampler.cc
   branches/itanium2/fox/FMantaNavigator.h
   branches/itanium2/fox/FMantaQuakeNav.h
   branches/itanium2/fox/FMantaUniformNav.h
   branches/itanium2/fox/FMantaWindow.cc
   branches/itanium2/fox/FMantaWindow.h
Log:
Commit before 3pm demo

Modified: branches/itanium2/Engine/Display/FileDisplay.cc
==============================================================================
--- branches/itanium2/Engine/Display/FileDisplay.cc     (original)
+++ branches/itanium2/Engine/Display/FileDisplay.cc     Tue Jun 21 15:31:13 
2005
@@ -11,12 +11,13 @@
 #include <Image/SimpleImage.h>
 #include <Image/TGAFile.h>
 #include <Interface/Context.h>
+#include <SCIRun/Core/Thread/Time.h>
 
 using namespace Manta;
 using namespace std;
 using SCIRun::IllegalValue;
 using SCIRun::InternalError;
-
+using SCIRun::Time;
 ImageDisplay *FileDisplay::create(
   const vector< string > &args )
 {
@@ -63,7 +64,14 @@
     stringstream ss;
     ss << baseName << "_" << setfill( '0' ) << setw( 5 ) << currentFrame << 
".tga";
     string name = ss.str();
+               
+               double start_time = Time::currentSeconds();
+               
     writeTGA( image, name, 0 );
+               
+               double end_time = Time::currentSeconds();
+               
+               std::cout << "Frame write time: " << (end_time - 
start_time)/60.0 << " minutes." << std::endl;
   }
   ++currentFrame;
 }

Modified: branches/itanium2/Engine/PixelSamplers/JitterSampler.cc
==============================================================================
--- branches/itanium2/Engine/PixelSamplers/JitterSampler.cc     (original)
+++ branches/itanium2/Engine/PixelSamplers/JitterSampler.cc     Tue Jun 21 
15:31:13 2005
@@ -26,7 +26,7 @@
 }
 
 JitterSampler::JitterSampler(const vector<string>& args):
-  num_samples(4), use_cheaprng(true)
+  num_samples(4), use_cheaprng(true), random( 0 )
 {
   int argc = static_cast<int>(args.size());
   for(int i = 0; i<argc;i++){

Modified: branches/itanium2/fox/FMantaNavigator.h
==============================================================================
--- branches/itanium2/fox/FMantaNavigator.h     (original)
+++ branches/itanium2/fox/FMantaNavigator.h     Tue Jun 21 15:31:13 2005
@@ -39,7 +39,7 @@
                virtual long onMouseChange   ( FXObject *sender, FXSelector 
sel, void *data ) = 0;
                
                virtual void setControlSpeed( Real new_speed ) = 0;
-               virtual void resetToCamera( const Point &eye, const Point 
&lookat, const Vector &up ) {  };
+               virtual void resetToCamera( const Point &eye, const Point 
&lookat, const Vector &up ) = 0;
        };
 
 };

Modified: branches/itanium2/fox/FMantaQuakeNav.h
==============================================================================
--- branches/itanium2/fox/FMantaQuakeNav.h      (original)
+++ branches/itanium2/fox/FMantaQuakeNav.h      Tue Jun 21 15:31:13 2005
@@ -103,6 +103,7 @@
                long onMouseChange( FXObject *sender, FXSelector sel, void 
*data );
                
                void setControlSpeed( Real new_speed ) { translateStepSize = 
new_speed; };
+               void resetToCamera( const Point &eye, const Point &lookat, 
const Vector &up );
                
                // Transaction callback for manta thread. 
                void mantaThreadCallback() const;

Modified: branches/itanium2/fox/FMantaUniformNav.h
==============================================================================
--- branches/itanium2/fox/FMantaUniformNav.h    (original)
+++ branches/itanium2/fox/FMantaUniformNav.h    Tue Jun 21 15:31:13 2005
@@ -75,6 +75,9 @@
                // Accessors.
                void setTrackballRadius( Real trackball_radius_ ) { 
trackball_radius = trackball_radius_; };
                void setControlSpeed( Real new_speed )            { amount = 
new_speed; };
+               
+               void resetToCamera( const Point &eye, const Point &lookat, 
const Vector &up ) { 
+                       /* Uniform nav contains no camera state. */ };
        };
 };
 

Modified: branches/itanium2/fox/FMantaWindow.cc
==============================================================================
--- branches/itanium2/fox/FMantaWindow.cc       (original)
+++ branches/itanium2/fox/FMantaWindow.cc       Tue Jun 21 15:31:13 2005
@@ -62,13 +62,14 @@
        new FXMenuTitle  ( menu_bar,  "Shadows", 0, shadow_menu );
        
        // Sampler menu.
+       /*
        sampler_menu = new FXMenuPane( this );
        new FXMenuCommand( sampler_menu, "Single Sample", 0, this, 
ID_SINGLE_SAMPLER );
        new FXMenuCommand( sampler_menu, "Jitter 2 Samples", 0, this, 
ID_JITTER2_SAMPLER );
        new FXMenuCommand( sampler_menu, "Jitter 4 Samples", 0, this, 
ID_JITTER4_SAMPLER );
        new FXMenuCommand( sampler_menu, "Jitter 8 Samples", 0, this, 
ID_JITTER8_SAMPLER );
        new FXMenuTitle( menu_bar, "Samplers", 0, sampler_menu );
-
+        */
        // Config Menu.
        // config_menu = new FXMenuPane( this );
        // new FXMenuCommand( config_menu, "Cutting Planes", 0, 
cutting_dialog, FMantaCuttingDialog::ID_SHOW );
@@ -220,7 +221,7 @@
 
 
///////////////////////////////////////////////////////////////////////////////
 
-void FMantaWindow::mantaThreadBookmark( const string camera_text ) const {
+void FMantaWindow::mantaThreadBookmark( const string camera_text ) {
 
        // Determine the channel number.
        int channel = manta_frame->getMantaChannel();
@@ -233,6 +234,9 @@
        // Check to make sure the camera text was valid.
        if (camera != 0) {
                manta_interface->setCamera( channel, camera );
+               
+               // This is unsafe.
+               manta_frame->getNavigator()->resetToCamera( 
camera->getPosition(),camera->getLookAt(),camera->getUp());
        }
 }
 

Modified: branches/itanium2/fox/FMantaWindow.h
==============================================================================
--- branches/itanium2/fox/FMantaWindow.h        (original)
+++ branches/itanium2/fox/FMantaWindow.h        Tue Jun 21 15:31:13 2005
@@ -104,7 +104,7 @@
                FMantaImageFrame *getMantaFrame()     { return manta_frame; };
                
                // This method is called by the manta thread to replace the 
camera.
-               void mantaThreadBookmark( const string camera_text ) const;
+               void mantaThreadBookmark( const string camera_text );
                
                // This method is called by the manta thread to replace the 
shadow algorithm.
                void mantaShadowAlgorithm( const string shadow_text ) const;





Archive powered by MHonArc 2.6.16.

Top of page