Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r898 - trunk/Engine/Control
- Date: Tue, 7 Feb 2006 17:26:48 -0700 (MST)
Author: abe
Date: Tue Feb 7 17:26:48 2006
New Revision: 898
Added:
trunk/Engine/Control/RTRT_register.h
- copied, changed from r894, branches/AFR/Engine/Control/RTRT_register.h
Removed:
trunk/Engine/Control/Worker.cc
trunk/Engine/Control/Worker.h
Modified:
trunk/Engine/Control/CMakeLists.txt
trunk/Engine/Control/RTRT.cc
trunk/Engine/Control/RTRT.h
Log:
Moved Worker inside of RTRT. Added RTRT_register.h header.
M Control/RTRT.cc
D Control/Worker.h
M Control/RTRT.h
A Control/RTRT_register.h
M Control/CMakeLists.txt
D Control/Worker.cc
Modified: trunk/Engine/Control/CMakeLists.txt
==============================================================================
--- trunk/Engine/Control/CMakeLists.txt (original)
+++ trunk/Engine/Control/CMakeLists.txt Tue Feb 7 17:26:48 2006
@@ -3,6 +3,5 @@
Control/RTRT.h
Control/RTRT.cc
Control/RTRT_register.cc
- Control/Worker.h
- Control/Worker.cc
+ Control/RTRT_register.h
)
Modified: trunk/Engine/Control/RTRT.cc
==============================================================================
--- trunk/Engine/Control/RTRT.cc (original)
+++ trunk/Engine/Control/RTRT.cc Tue Feb 7 17:26:48 2006
@@ -1,7 +1,7 @@
#include <Engine/Control/RTRT.h>
+#include <Engine/Control/RTRT_register.h>
#include <Core/Util/Args.h>
-#include <Engine/Control/Worker.h>
#include <Interface/AmbientLight.h>
#include <Interface/Background.h>
#include <Interface/Callback.h>
@@ -60,8 +60,28 @@
return new RTRT();
}
- extern void registerKnownComponents(MantaInterface* rtrt);
}
+
+///////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+// RTRT Worker class.
+RTRT::Worker::Worker(RTRT* rtrt, int workerIndex, bool lateComerFlag)
+ : rtrt(rtrt), workerIndex(workerIndex), lateComerFlag(lateComerFlag)
+{
+}
+
+RTRT::Worker::~Worker()
+{
+}
+
+void RTRT::Worker::run()
+{
+ rtrt->internalRenderLoop(workerIndex, lateComerFlag);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
RTRT::RTRT()
: runningLock("RTRT running mutex"),
Modified: trunk/Engine/Control/RTRT.h
==============================================================================
--- trunk/Engine/Control/RTRT.h (original)
+++ trunk/Engine/Control/RTRT.h Tue Feb 7 17:26:48 2006
@@ -10,6 +10,7 @@
#include <Core/Thread/CrowdMonitor.h>
#include <Core/Thread/Mutex.h>
#include <Core/Thread/Semaphore.h>
+#include <Core/Thread/Runnable.h>
#include <Core/Util/ThreadStorage.h>
#include <map>
#include <set>
@@ -157,9 +158,22 @@
protected:
- friend class Worker;
void internalRenderLoop(int workerIndex, bool lateComerFlag);
+
///////////////////////////////////////////////////////////////////////////
+ // Worker class for the RTRT Pipeline.
+ class Worker : public SCIRun::Runnable {
+ public:
+ Worker(RTRT* rtrt, int workerIndex, bool lateComerFlag);
+ virtual ~Worker();
+
+ virtual void run();
+ private:
+ RTRT* rtrt;
+ int workerIndex;
+ bool lateComerFlag;
+ };
+
private:
RTRT(const RTRT&);
RTRT& operator=(const RTRT&);
Copied: trunk/Engine/Control/RTRT_register.h (from r894,
branches/AFR/Engine/Control/RTRT_register.h)
==============================================================================
--- branches/AFR/Engine/Control/RTRT_register.h (original)
+++ trunk/Engine/Control/RTRT_register.h Tue Feb 7 17:26:48 2006
@@ -31,12 +31,14 @@
#define Manta_Engine_RTRT_register_h
namespace Manta {
+
+ class MantaInterface;
/////////////////////////////////////////////////////////////////////////////
// Register all "known" components with the RTRTInterface.
// ImageTraversers, PixelSamplers, other command line args should be
added to
// the RTRT_register.cc file.
- void registerKnownComponents(RTRTInterface* rtrt);
+ void registerKnownComponents(MantaInterface* rtrt);
};
#endif
- [MANTA] r898 - trunk/Engine/Control, abe, 02/07/2006
Archive powered by MHonArc 2.6.16.