Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r620 - in branches/itanium2: Engine/Control UserInterface fox


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r620 - in branches/itanium2: Engine/Control UserInterface fox
  • Date: Thu, 13 Oct 2005 00:45:24 -0600 (MDT)

Author: abe
Date: Thu Oct 13 00:45:23 2005
New Revision: 620

Modified:
   branches/itanium2/Engine/Control/RTRT.cc
   branches/itanium2/Engine/Control/RTRT.h
   branches/itanium2/UserInterface/AutomatorUI.cc
   branches/itanium2/UserInterface/AutomatorUI.h
   branches/itanium2/UserInterface/CameraPathAutomator.cc
   branches/itanium2/UserInterface/CameraPathAutomator.h
   branches/itanium2/fox/FMantaRecorder.cc
   branches/itanium2/fox/FMantaRecorder.h
Log:

Added Stop, Re-Play, and Loop options to the dm_demo camera path interface. 

Now you don't have to watch the whole path if you don't want to.

You can change samplers, cameras, image traversers, etc while the path is 
running.

M    fox/FMantaRecorder.cc
M    fox/FMantaRecorder.h
M    UserInterface/AutomatorUI.h
M    UserInterface/CameraPathAutomator.cc
M    UserInterface/CameraPathAutomator.h
M    UserInterface/AutomatorUI.cc

Added parallel one shot callbacks.
M    Engine/Control/RTRT.cc
M    Engine/Control/RTRT.h


Modified: branches/itanium2/Engine/Control/RTRT.cc
==============================================================================
--- branches/itanium2/Engine/Control/RTRT.cc    (original)
+++ branches/itanium2/Engine/Control/RTRT.cc    Thu Oct 13 00:45:23 2005
@@ -118,7 +118,7 @@
 }
 
 void RTRT::addOneShotCallback(Whence whence, long frame,
-                                                                             
                                           CallbackBase_2Data<int, int>* 
callback)
+                              CallbackBase_2Data<int, int>* callback)
 {
 #if NOTFINISHED
   // What about adding callbacks during anim cycle?
@@ -135,6 +135,20 @@
   callbackLock.writeUnlock();
 }
 
+void RTRT::addParallelOneShotCallback(Whence whence, long frame,
+                              CallbackBase_2Data<int, int>* callback)
+{
+  callbackLock.writeLock();
+
+  if(whence == RTRTInterface::Relative) {
+    frame += animFrameState.frameNumber;
+       }
+
+  parallelOneShots.insert(OneShotMapType::value_type(frame, callback));
+  callbackLock.writeUnlock();
+}
+
+
 void RTRT::registerSetupCallback(SetupCallback* callback)
 {
   setupCallbacks.push_back(callback);
@@ -427,8 +441,17 @@
   }
 }
 
-void RTRT::doParallelAnimationCallbacks(bool& changed, int proc, int 
numProcs)
-{
+void RTRT::doParallelAnimationCallbacks(bool& changed, int proc, int 
numProcs) {
+
+  // Parallel one shot callbacks.
+  ParallelOneShotMapType::iterator iter = parallelOneShots.begin();
+  while(iter != parallelOneShots.end() && iter->first < 
animFrameState.frameNumber){
+    iter->second->call(proc, numProcs);
+    delete iter->second;
+    parallelOneShots.erase(iter);
+    iter = parallelOneShots.begin();
+  }
+
   // All threads do the parallel animation callbacks
   for(ACallbackMapType::iterator iter = parallelAnimationCallbacks.begin();
       iter != parallelAnimationCallbacks.end(); iter++){

Modified: branches/itanium2/Engine/Control/RTRT.h
==============================================================================
--- branches/itanium2/Engine/Control/RTRT.h     (original)
+++ branches/itanium2/Engine/Control/RTRT.h     Thu Oct 13 00:45:23 2005
@@ -106,6 +106,8 @@
     // Callbacks
     virtual void addOneShotCallback(Whence whence, long frame,
                                    CallbackBase_2Data<int, int>* callback);
+    virtual void addParallelOneShotCallback(Whence whence, long frame,
+                                   CallbackBase_2Data<int, int>* callback);  
  
     virtual void registerSetupCallback(SetupCallback*);
     virtual void registerSerialAnimationCallback(CallbackBase_3Data<int, 
int, bool&>*);
     virtual void registerParallelAnimationCallback(CallbackBase_3Data<int, 
int, bool&>*);
@@ -188,6 +190,10 @@
     // Callbacks
     typedef multimap<long, CallbackBase_2Data<int, int>*, less<long> > 
OneShotMapType;
     OneShotMapType oneShots;
+
+    typedef multimap<long, CallbackBase_2Data<int, int>*, less<long> > 
ParallelOneShotMapType;
+    ParallelOneShotMapType parallelOneShots;
+    
     typedef vector<CallbackBase_2Data<int, int>*> PRCallbackMapType;
     typedef vector<CallbackBase_3Data<int, int, bool&>*> ACallbackMapType;
     PRCallbackMapType parallelPreRenderCallbacks;

Modified: branches/itanium2/UserInterface/AutomatorUI.cc
==============================================================================
--- branches/itanium2/UserInterface/AutomatorUI.cc      (original)
+++ branches/itanium2/UserInterface/AutomatorUI.cc      Thu Oct 13 00:45:23 
2005
@@ -39,40 +39,83 @@
   manta_interface( manta_interface_ ),
   warmup_frames( warmup_frames_ ),
   is_detached( is_detached_ ),
-  startup_semaphore( "AutomatorUI semaphore", 0 )
+  automator_mode( AUTOMATOR_EXIT ),
+  startup_semaphore( "AutomatorUI semaphore", 0 ),
+  this_thread( 0 ),
+  terminate_callback( 0 )
 {
 }
 
+AutomatorUI::~AutomatorUI() {
+
+  // Delete the terminate callback if it was ever set.
+  if (terminate_callback != 0) {
+    delete terminate_callback;
+  }
+}
+
 void AutomatorUI::run() {
 
   // Have manta call release_automator after warmup_frames.
-  manta_interface->addOneShotCallback( RTRTInterface::Absolute, 
warmup_frames,
+  manta_interface->addOneShotCallback( RTRTInterface::Relative, 
warmup_frames,
                                        Callback::create(this, 
&AutomatorUI::release_automator) );
-  
-
-  // Wait for the manta rendering threads to signal the semaphore.
-  startup_semaphore.down();
 
-  // Run the automator function.
-  run_automator();
+  do {
+    
+    // Wait for the manta rendering threads to signal the semaphore.
+    startup_semaphore.down();
+    
+    // Run the automator function.
+    run_automator();
+
+    // Send a final transaction to make sure all of the state changes sent 
from
+    // run_automator are processed before the thread exits.
+    getMantaInterface()->addTransaction("AutomatorUI finished",
+                                        Callback::create(this, 
&AutomatorUI::release_automator,
+                                                         0, 0));
+
+    // Wait for manta to process the transaction.
+    startup_semaphore.down();
+
+    // Call the termination callback if it exists.
+    if (terminate_callback) {
+      terminate_callback->call();
+    }
+  }
+  while (automator_mode == AUTOMATOR_KEEPALIVE);
 
-  // Send a final transaction to make sure all of the state changes sent from
-  // run_automator are processed before the thread exits.
-  startup_semaphore.down();
-
-  getMantaInterface()->addTransaction("AutomatorUI finished",
-                                      Callback::create(this, 
&AutomatorUI::release_automator,
-                                                       0, 0));
+  // Thread will terminate.
+  this_thread = 0;
 }
 
 void AutomatorUI::startup() {
 
-  // Create a thread for the automator.
-  Thread *t = new Thread( this, "AutomatorUI" );
+  // Check to see if the automator is already started.
+  if (this_thread == 0) {
   
-  if ( is_detached ) {
-    t->setDaemon( true );
-    t->detach();
+    // Create a thread for the automator.
+    this_thread = new Thread( this, "AutomatorUI" );
+
+    if (is_detached) {
+      this_thread->setDaemon( true );
+      this_thread->detach();
+    }
+  }
+}
+
+void AutomatorUI::restart() {
+
+  // Make sure a thread was created.
+  if (this_thread) {
+
+    // Have manta call release_automator immediately.
+    manta_interface->addOneShotCallback( RTRTInterface::Relative, 0,
+                                         Callback::create(this, 
&AutomatorUI::release_automator) );    
+  }
+
+  // Otherwise start a thread.
+  else {
+    startup();
   }
 }
 

Modified: branches/itanium2/UserInterface/AutomatorUI.h
==============================================================================
--- branches/itanium2/UserInterface/AutomatorUI.h       (original)
+++ branches/itanium2/UserInterface/AutomatorUI.h       Thu Oct 13 00:45:23 
2005
@@ -32,15 +32,16 @@
 #include <Interface/RTRTInterface.h>
 #include <Interface/UserInterface.h>
 
+#include <SCIRun/Core/Thread/Thread.h>
 #include <SCIRun/Core/Thread/Runnable.h>
 #include <SCIRun/Core/Thread/Semaphore.h>
 
-
-
 namespace Manta {
 
+  using SCIRun::Thread;
   using SCIRun::Runnable;
   using SCIRun::Semaphore;
+
   
   
/////////////////////////////////////////////////////////////////////////////
   // An Automator is an automated user interface. Classes which implement the
@@ -54,6 +55,9 @@
   // Abe Stephens
   class AutomatorUI : public UserInterface, public Runnable {
   private:
+    // Thread to run the automator.
+    Thread *this_thread;
+    
     // Flag to signal that the renderer is ready to begin accepting 
connections.
     Semaphore startup_semaphore;
 
@@ -65,14 +69,24 @@
 
     // Is the thread detached (should it wait for a join?)
     bool is_detached;
+
+    // Should the automator thread wait for a restart message after
+    // the run_automator method terminates?
+    int automator_mode;
+
+    // Callback to invoke at end of run_automator. Use to notify gui that 
automator
+    // is complete and ready to be restarted.
+    CallbackBase_0Data *terminate_callback;
     
   protected:
     inline RTRTInterface *getMantaInterface() { return manta_interface; };
-    
+
   public:
+    enum { AUTOMATOR_EXIT, AUTOMATOR_KEEPALIVE };
+    
     // Renderer will release the semaphore after "warmup_frames" have been 
rendered
     AutomatorUI( RTRTInterface *manta_interface_, int warmup_frames_ = 0, 
bool is_detached_ = true );
-    virtual ~AutomatorUI() { };
+    virtual ~AutomatorUI();
 
     // This method must be implemented by Automator implementations.
     virtual void run_automator() = 0;
@@ -81,10 +95,26 @@
     void run();
 
     // UserInterface interface.
+    // Start up if not already started (called automatically by restart if 
necessary).
     void startup();
+    
+    // Restart the automator if it is blocked waiting for the restart signal.
+    void restart();
 
     // Called by manta to release semaphore.
     void release_automator( int, int );
+
+    // Accessors.
+    inline void set_automator_mode( int mode_ ) { automator_mode = mode_; };
+    inline int  get_automator_mode() { return automator_mode; };
+
+    inline void set_terminate_callback( CallbackBase_0Data *callback_ ) {
+      if (callback_ == 0) {
+        delete terminate_callback;
+      }
+      terminate_callback = callback_;
+    };
+
   };
 };
 

Modified: branches/itanium2/UserInterface/CameraPathAutomator.cc
==============================================================================
--- branches/itanium2/UserInterface/CameraPathAutomator.cc      (original)
+++ branches/itanium2/UserInterface/CameraPathAutomator.cc      Thu Oct 13 
00:45:23 2005
@@ -61,6 +61,7 @@
   channel( channel_ ),
   last_sync_frame( 0 ),
   last_sync_seconds( 0 ),
+  average_fps( 0 ),
   delta_t( delta_t_ ),
   delta_time( delta_time_ ),
   total_points( total_points_ ),
@@ -84,10 +85,11 @@
                                           int warmup_frames, const string 
&file_name,
                                           Real delta_t_, Real delta_time_ ) :
   AutomatorUI( manta_interface_, warmup_frames ),
-  synchronize_barrier( "sync barrier" ),  
+  synchronize_barrier( "sync barrier" ),
   channel( channel_ ),
   last_sync_frame( 0 ),
-  last_sync_seconds( 0 ),  
+  last_sync_seconds( 0 ),
+  average_fps( 0 ),
   delta_t( delta_t_ ),
   delta_time( delta_time_ ),
   loop_behavior( PATH_STOP ), 
@@ -338,12 +340,12 @@
     
     
/////////////////////////////////////////////////////////////////////////////
     // Main Automator loop.
-    for (current_point=first_point;current_point<last_point;++current_point) 
{
+    for (current_point=first_point;(current_point<last_point) && 
(loop_behavior!=PATH_ABORT);++current_point) {
     
       
///////////////////////////////////////////////////////////////////////////
       // Sample by delta_t between the points.
-      for (Real t=0.0; t<(1.0-delta_t); t+=delta_t) {
-    
+      for (Real t=0.0; (t<(1.0-delta_t)) && (loop_behavior!=PATH_ABORT); 
t+=delta_t) {
+
         // Evaluate the spline.
         // NOTE: operator & is overloaded by Vector to return (Real *)
         // NOTE: none of the necessary operations are defined for Points...
@@ -381,10 +383,12 @@
       }
     }
 
+    // Compute the average fps for this run.
     int total_frames = getMantaInterface()->getCurrentFrame() - start_frame;
-  
+    average_fps = 
(Real)total_frames/(SCIRun::Time::currentSeconds()-start_seconds);
+    
     std::cerr << "Path complete. "    << total_frames
-              << " frames. Avg fps: " << 
(Real)total_frames/(SCIRun::Time::currentSeconds()-start_seconds) << 
std::endl;
+              << " frames. Avg fps: " << average_fps << std::endl;
 
 
   }

Modified: branches/itanium2/UserInterface/CameraPathAutomator.h
==============================================================================
--- branches/itanium2/UserInterface/CameraPathAutomator.h       (original)
+++ branches/itanium2/UserInterface/CameraPathAutomator.h       Thu Oct 13 
00:45:23 2005
@@ -69,19 +69,27 @@
     // Synchronization barrier.
     Barrier synchronize_barrier;
 
-    int  last_sync_frame;
     Real last_sync_seconds;
+    int  last_sync_frame;
 
     // Number of frames between synchronization points.
     int sync_frames;
 
     
///////////////////////////////////////////////////////////////////////////
     // Behavior
-    enum { PATH_STOP, PATH_EXIT, PATH_LOOP };
     int loop_behavior;
     int interval_start, interval_last;
+
+    
///////////////////////////////////////////////////////////////////////////
+    // Performance counters.
+
+    // fps for the last complete run of this automator.
+    Real average_fps;
     
   public:
+    // Loop Behaviors
+    enum { PATH_STOP, PATH_EXIT, PATH_LOOP, PATH_ABORT };
+
     CameraPathAutomator( RTRTInterface *manta_interface_, int channel_, int 
warmup_, const string &file_name, 
                          Real delta_t_ = 0.2, Real delta_time_ = 0.2 );
     
@@ -104,7 +112,7 @@
 
     // This may be called to write the camera path to a specified file in 
the correct format.
     void write_path( const string &file_name );
-    
+
     // Accessors.
     inline int get_total_points() { return total_points; };
 
@@ -117,9 +125,13 @@
     inline int  get_sync_frames()                   { return sync_frames; };
     inline void set_sync_frames( int sync_frames_ ) { sync_frames = 
sync_frames_; };
 
-    inline void set_loop_behavior( int behavior_ )  { loop_behavior = 
behavior_; };
+    inline void set_loop_behavior( int behavior_ )    { loop_behavior = 
behavior_; };
+    inline void set_interval( int start, int last )   { interval_start = 
start; interval_last = last; };
+    inline void get_interval( int &start, int &last ) { start = 
interval_start; last = interval_last; };
+
+    // Get the fps for the last complete run.
+    inline Real get_average_fps() { return average_fps; };
 
-    inline void set_interval( int start, int last ) { interval_start = 
start; interval_last = last; };
   };
 };
 

Modified: branches/itanium2/fox/FMantaRecorder.cc
==============================================================================
--- branches/itanium2/fox/FMantaRecorder.cc     (original)
+++ branches/itanium2/fox/FMantaRecorder.cc     Thu Oct 13 00:45:23 2005
@@ -39,6 +39,7 @@
   //        Message_Type ID                                   Message_Handler
   FXMAPFUNC(SEL_COMMAND, FMantaRecorderDialog::ID_LOAD,       
FMantaRecorderDialog::onLoad ),
   FXMAPFUNC(SEL_COMMAND, FMantaRecorderDialog::ID_PLAY,       
FMantaRecorderDialog::onPlay ),
+  FXMAPFUNC(SEL_COMMAND, FMantaRecorderDialog::ID_STOPPLAY,   
FMantaRecorderDialog::onStopPlay ),
   FXMAPFUNC(SEL_COMMAND, FMantaRecorderDialog::ID_RECORD,     
FMantaRecorderDialog::onRecord ),
   FXMAPFUNC(SEL_COMMAND, FMantaRecorderDialog::ID_STOP,       
FMantaRecorderDialog::onStop ),
   FXMAPFUNC(SEL_COMMAND, FMantaRecorderDialog::ID_SAVE,       
FMantaRecorderDialog::onSave ),
@@ -77,9 +78,14 @@
   file_name_field->disable();
 
   play_group = new FXVerticalFrame( play_tab_frame );
-  play_button = new FXButton( play_group, "Play", 0, this, ID_PLAY );
+
+  frame = new FXHorizontalFrame( play_group );
+  play_button = new FXButton( frame, "Play", 0, this, ID_PLAY );
   play_button->disable();
   
+  stopplay_button = new FXButton( frame, "Stop", 0, this, ID_STOPPLAY );
+  stopplay_button->disable();
+  
   frame = new FXHorizontalFrame( play_group );
   new FXLabel( frame, "Delta time: " );
   play_time_spinner = new FXRealSpinner( frame, 5 );
@@ -96,6 +102,19 @@
   play_t_spinner->setIncrement( 0.05 );
   play_t_spinner->disable();
 
+  frame = new FXHorizontalFrame( play_group );
+  new FXLabel( frame, "Interval: " );
+  play_start_spinner = new FXSpinner( frame, 5 );
+  play_start_spinner->setIncrement( 1 );
+  play_start_spinner->disable();
+  play_last_spinner = new FXSpinner( frame, 5 );
+  play_last_spinner->setIncrement( 1 );
+  play_last_spinner->disable();
+
+  play_loop_check = new FXCheckButton( play_group, "Loop" );
+  play_loop_check->setCheck( FALSE );
+  play_loop_check->disable();
+  
   
//////////////////////////////////////////////////////////////////////////////
   // Record tab.
   record_tab = new FXTabItem( tab_book, "Record", 0 );
@@ -108,8 +127,8 @@
   new FXLabel( frame, "Sample Interval: " );
   record_interval = new FXRealSpinner( frame, 5 );
   record_interval->setRange( 0.0, 999.0 );
-  record_interval->setIncrement( 0.05 );
-  record_interval->setValue( 0.2 );
+  record_interval->setIncrement( 0.1 );
+  record_interval->setValue( 1.0 );
 
   frame = new FXHorizontalFrame( record_group );
   new FXLabel( frame, "Total samples:" );
@@ -145,7 +164,7 @@
 
   
   frame = new FXHorizontalFrame( save_group );
-  preview_button = new FXButton( frame, "Preview", 0, this, ID_PREVIEW );
+  preview_button = new FXButton( frame, "Keep", 0, this, ID_PREVIEW );
   preview_button->disable();
   
   save_button = new FXButton( frame, "Save", 0, this, ID_SAVE );
@@ -172,6 +191,11 @@
       automator = new CameraPathAutomator( 
manta_window->getMantaInterface(), 0, 0,
                                            file_name.text() );
 
+      // Specify that the Automator should wait for additional commands after
+      // completing each run.
+      automator->set_automator_mode( AutomatorUI::AUTOMATOR_KEEPALIVE );
+      automator->set_terminate_callback( Callback::create( this, 
cameraPathComplete ) );
+
     } catch (SCIRun::Exception *e) {
       FXMessageBox::error(this,MBOX_OK,"Error processing 
file:",e->message());
     }
@@ -189,9 +213,26 @@
 
       // Enable the play buttons.
       play_button->enable();
+      stopplay_button->disable();
       play_t_spinner->enable();
       play_time_spinner->enable();
-    
+
+      // Enable interval.
+      int start, last;
+      automator->get_interval( start, last );
+
+      // Last two points are not available.
+      int total_points = automator->get_total_points() - 2;
+      
+      play_start_spinner->setValue( start );
+      play_start_spinner->setRange( 1, total_points );
+      play_start_spinner->enable();
+
+      play_last_spinner->setValue( last );
+      play_last_spinner->setRange( 1, total_points );
+      play_last_spinner->enable();
+
+      play_loop_check->enable();
     }
   }
   
@@ -203,23 +244,50 @@
   // Get the desired delta_t and delta_time.
   Real delta_t = play_t_spinner->getValue();
   Real delta_time = play_time_spinner->getValue();
-  FXString file_name = file_name_field->getText();
+  // FXString file_name = file_name_field->getText();
 
   // Set the delta's if they were changed.
   automator->set_delta_t( delta_t );
   automator->set_delta_time( delta_time );
 
+  // Set the interval.
+  int start = play_start_spinner->getValue();
+  int last  = play_last_spinner->getValue();
+  automator->set_interval( start, last );
+
+  if (play_loop_check->getCheck()) {
+    automator->set_loop_behavior( CameraPathAutomator::PATH_LOOP );
+  }
+  else {
+    automator->set_loop_behavior( CameraPathAutomator::PATH_STOP );
+  }
+  
   // Disable the play buttons.
   play_button->disable();
+  stopplay_button->enable();
   play_t_spinner->disable();
   play_time_spinner->disable();
+  play_start_spinner->disable();
+  play_last_spinner->disable();
+  play_loop_check->disable();
   
   // Start the asynchronous thread.
-  automator->startup();
+  automator->restart();
   
   return 1;
 }
 
+long FMantaRecorderDialog::onStopPlay  ( FXObject *sender, FXSelector key, 
void *data ) {
+
+  // Set the automator's behavior flag to PATH_ABORT. This will cause the 
run_automator
+  // method to terminate, and then the AutomatorUI will execute it's 
termination callback
+  // which will enable the play button.
+
+  automator->set_loop_behavior( CameraPathAutomator::PATH_ABORT );
+
+  return 1;
+}
+
 long FMantaRecorderDialog::onRecord( FXObject *sender, FXSelector key, void 
*data ) {
 
   // Allocate storage for the camera positions.
@@ -278,9 +346,40 @@
                                        record_t_spinner->getValue(),
                                        record_time_spinner->getValue() );
 
+
+  // Specify that the Automator should wait for additional commands after
+  // completing each run.
+  automator->set_automator_mode( AutomatorUI::AUTOMATOR_KEEPALIVE );
+  automator->set_terminate_callback( Callback::create( this, 
cameraPathComplete ) );
+  
+  // Set the GUI configurable values.
   play_t_spinner->setValue( record_t_spinner->getValue() );
   play_time_spinner->setValue( record_time_spinner->getValue() );
 
+  // Enable the play buttons.
+  play_button->enable();
+  stopplay_button->disable();
+  
+  play_t_spinner->enable();
+  play_time_spinner->enable();
+
+      // Enable interval.
+  int start, last;
+  automator->get_interval( start, last );
+
+      // Last two points are not available.
+  int total_points = automator->get_total_points() - 2;
+      
+  play_start_spinner->setValue( start );
+  play_start_spinner->setRange( 1, total_points );
+  play_start_spinner->enable();
+
+  play_last_spinner->setValue( last );
+  play_last_spinner->setRange( 1, total_points );
+  play_last_spinner->enable();
+
+  play_loop_check->enable();
+  
   // Delete the data.
   record_iter = 0;
   delete [] record_eye;
@@ -290,7 +389,6 @@
   // Enable playing or recording another path.
   preview_button->disable();
   
-  play_button->enable();
   record_button->enable();
   save_button->enable();
   
@@ -345,4 +443,17 @@
   }
   
   return 1;
+};
+
+// This function is called by the camera path thread to signal that the path 
is complete.
+void FMantaRecorderDialog::cameraPathComplete() {
+
+  // Turn the play options back on.
+  play_button->enable();
+  stopplay_button->disable();
+  play_t_spinner->enable();
+  play_time_spinner->enable();
+  play_start_spinner->enable();
+  play_last_spinner->enable();
+  play_loop_check->enable();
 };

Modified: branches/itanium2/fox/FMantaRecorder.h
==============================================================================
--- branches/itanium2/fox/FMantaRecorder.h      (original)
+++ branches/itanium2/fox/FMantaRecorder.h      Thu Oct 13 00:45:23 2005
@@ -29,15 +29,18 @@
 #ifndef __FMANTARECORDER_H__
 #define __FMANTARECORDER_H__
 
-#include <Interface/RTRTInterface.h>
-#include <UserInterface/CameraPathAutomator.h>
-
 #include <fox/FMantaWindow.h>
 #include <fox/FMantaUniformNav.h>
 #include <fox/FMantaQuakeNav.h>
 #include <fox/FMantaTrackballNav.h>
 #include <fox/FMantaWidgets.h>
 
+// There appear to be some #define conflicts between the FX headers and the 
ones below.
+#include <Interface/RTRTInterface.h>
+#include <UserInterface/CameraPathAutomator.h>
+
+
+
 namespace fox_manta {
 
   using namespace FX;
@@ -86,9 +89,13 @@
     // Play tab fields.
     FXButton      *load_button;
     FXButton      *play_button;
+    FXButton      *stopplay_button; // The "stop playing" button. I already 
had a "stop button" when I added this.
     FXTextField   *file_name_field;
     FXRealSpinner *play_time_spinner;
     FXRealSpinner *play_t_spinner;
+    FXSpinner     *play_start_spinner;
+    FXSpinner     *play_last_spinner;
+    FXCheckButton *play_loop_check;
 
     // Record tab fields.
     FXButton *record_button;
@@ -107,6 +114,7 @@
     enum {
       ID_LOAD = FXDialogBox::ID_LAST,
       ID_PLAY,
+      ID_STOPPLAY,
       ID_RECORD,
       ID_STOP,
       ID_SAVE,
@@ -125,11 +133,14 @@
 
     long onLoad       ( FXObject *sender, FXSelector key, void *data );
     long onPlay       ( FXObject *sender, FXSelector key, void *data );
+    long onStopPlay   ( FXObject *sender, FXSelector key, void *data );
     long onRecord     ( FXObject *sender, FXSelector key, void *data );
     long onStop       ( FXObject *sender, FXSelector key, void *data );
     long onSave       ( FXObject *sender, FXSelector key, void *data );
     long onPreview    ( FXObject *sender, FXSelector key, void *data );
     long onRecordChore( FXObject *sender, FXSelector key, void *data );
+
+    void cameraPathComplete();
   };
 
 };




  • [MANTA] r620 - in branches/itanium2: Engine/Control UserInterface fox, abe, 10/13/2005

Archive powered by MHonArc 2.6.16.

Top of page