Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1152 - in trunk: DynLT Model Model/Groups scenes
- Date: Thu, 20 Jul 2006 22:56:06 -0600 (MDT)
Author: abe
Date: Thu Jul 20 22:56:02 2006
New Revision: 1152
Added:
trunk/DynLT/DynTimeSteppedParticles.cc
- copied, changed from r1151, trunk/Model/Groups/TimeSteppedParticles.cc
trunk/DynLT/DynTimeSteppedParticles.h
- copied, changed from r1151, trunk/Model/Groups/TimeSteppedParticles.h
Modified:
trunk/DynLT/CMakeLists.txt
trunk/Model/CMakeLists.txt
trunk/Model/Groups/CMakeLists.txt
trunk/Model/Groups/TimeSteppedParticles.cc
trunk/scenes/CMakeLists.txt
trunk/scenes/dynlt.cc
Log:
I don't know if it works, but it builds.
Made a copy of TimeSteppedParticles in DynLT/
A DynLT/DynTimeSteppedParticles.cc
A DynLT/DynTimeSteppedParticles.h
Removed dependency on libDynLT from Model.
M Model/Groups/TimeSteppedParticles.cc
M scenes/dynlt.cc
M scenes/CMakeLists.txt
M DynLT/CMakeLists.txt
M Model/Groups/CMakeLists.txt
M Model/CMakeLists.txt
Modified: trunk/DynLT/CMakeLists.txt
==============================================================================
--- trunk/DynLT/CMakeLists.txt (original)
+++ trunk/DynLT/CMakeLists.txt Thu Jul 20 22:56:02 2006
@@ -10,8 +10,15 @@
DynLTStatsCollector.cc
DynLTWorker.h
DynLTWorker.cc
+ DynTimeSteppedParticles.h
+ DynTimeSteppedParticles.cc
)
+INCLUDE_DIRECTORIES(${FOUND_TEEM_INCLUDE})
+
ADD_LIBRARY(Manta_DynLT ${Manta_DynLT_SRCS})
-TARGET_LINK_LIBRARIES(Manta_DynLT Manta_Model SCIRun_Core)
+TARGET_LINK_LIBRARIES(Manta_DynLT Manta_Engine
+ Manta_Model
+ SCIRun_Core
+ )
Copied: trunk/DynLT/DynTimeSteppedParticles.cc (from r1151,
trunk/Model/Groups/TimeSteppedParticles.cc)
==============================================================================
--- trunk/Model/Groups/TimeSteppedParticles.cc (original)
+++ trunk/DynLT/DynTimeSteppedParticles.cc Thu Jul 20 22:56:02 2006
@@ -1,10 +1,11 @@
#include <Core/Exceptions/InputError.h>
#include <Core/Exceptions/OutputError.h>
-#ifdef BUILD_DYNLT
+
+
#include <DynLT/DynLTGridSpheres.h>
-#endif
-#include <Model/Groups/TimeSteppedParticles.h>
+
+#include <DynLT/DynTimeSteppedParticles.h>
#include <Model/Primitives/GridSpheres.h>
#include <Model/Readers/ParticleNRRD.h>
@@ -16,7 +17,7 @@
using namespace Manta;
-TimeSteppedParticles::TimeSteppedParticles(const string& filename, int
ncells,
+DynTimeSteppedParticles::DynTimeSteppedParticles(const string& filename, int
ncells,
int depth, Real radius, int ridx,
RegularColorMap* cmap, int cidx,
DynLTQueue* queue,
@@ -27,21 +28,17 @@
string::size_type pos=filename.find(".nrrd", 0);
if (pos != string::npos) {
ParticleNRRD pnrrd(filename);
-#ifdef BUILD_DYNLT
+
if (queue) {
add(new DynLTGridSpheres(queue, pnrrd.getParticleData(),
pnrrd.getNParticles(), pnrrd.getNVars(),
ncells,
depth, radius, ridx, cmap, cidx));
} else {
-#else
- cerr<<"TimeSteppedParticles - DynLTGridSpheres is not supported\n";
-#endif
+
add(new GridSpheres(pnrrd.getParticleData(), pnrrd.getNParticles(),
pnrrd.getNVars(), ncells, depth, radius, ridx,
cmap,
cidx));
-#ifdef BUILD_DYNLT
}
-#endif
return;
}
@@ -66,21 +63,17 @@
// Load the particle data
ParticleNRRD pnrrd(fname);
-#ifdef BUILD_DYNLT
+
if (queue) {
add(new DynLTGridSpheres(queue, pnrrd.getParticleData(),
pnrrd.getNParticles(), pnrrd.getNVars(),
ncells,
depth, radius, ridx, cmap, cidx));
} else {
-#else
- cerr<<"TimeSteppedParticles - DynLTGridSpheres is not supported\n";
-#endif
+
add(new GridSpheres(pnrrd.getParticleData(), pnrrd.getNParticles(),
pnrrd.getNVars(), ncells, depth, radius, ridx,
cmap,
cidx));
-#ifdef BUILD_DYNLT
}
-#endif
++nloaded;
}
@@ -88,12 +81,12 @@
in.close();
}
-TimeSteppedParticles::~TimeSteppedParticles(void)
+DynTimeSteppedParticles::~DynTimeSteppedParticles(void)
{
// Do nothing
}
-void TimeSteppedParticles::intersect(const RenderContext& context,
+void DynTimeSteppedParticles::intersect(const RenderContext& context,
RayPacket& rays) const
{
// Fetch the current timestep
@@ -101,7 +94,7 @@
obj->intersect(context, rays);
}
-void TimeSteppedParticles::computeBounds(const PreprocessContext& context,
+void DynTimeSteppedParticles::computeBounds(const PreprocessContext& context,
BBox& bbox) const
{
// Fetch the current timestep
Copied: trunk/DynLT/DynTimeSteppedParticles.h (from r1151,
trunk/Model/Groups/TimeSteppedParticles.h)
==============================================================================
--- trunk/Model/Groups/TimeSteppedParticles.h (original)
+++ trunk/DynLT/DynTimeSteppedParticles.h Thu Jul 20 22:56:02 2006
@@ -1,6 +1,6 @@
-#ifndef Manta_Model_TimeSteppedParticles_h
-#define Manta_Model_TimeSteppedParticles_h
+#ifndef Manta_DynLT_DynTimeSteppedParticles_h
+#define Manta_DynLT_DynDynTimeSteppedParticles_h
#include <MantaTypes.h>
#include <Model/Groups/Group.h>
@@ -16,14 +16,14 @@
class DynLTQueue;
class RegularColorMap;
- class TimeSteppedParticles : public Group
+ class DynTimeSteppedParticles : public Group
{
public:
- TimeSteppedParticles(const string& filename, int ncells, int depth,
+ DynTimeSteppedParticles(const string& filename, int ncells, int depth,
Real radius, int ridx, RegularColorMap* cmap, int
cidx,
DynLTQueue* queue=0, int min=0,
int max=INT_MAX);
- ~TimeSteppedParticles(void);
+ ~DynTimeSteppedParticles(void);
void intersect(const RenderContext& context, RayPacket& rays) const;
void computeBounds(const PreprocessContext& context, BBox& bbox) const;
@@ -37,4 +37,4 @@
};
}
-#endif // Manta_Model_TimeSteppedParticles_h
+#endif // Manta_Model_DynTimeSteppedParticles_h
Modified: trunk/Model/CMakeLists.txt
==============================================================================
--- trunk/Model/CMakeLists.txt (original)
+++ trunk/Model/CMakeLists.txt Thu Jul 20 22:56:02 2006
@@ -37,6 +37,7 @@
TARGET_LINK_LIBRARIES(Manta_Model Manta_Interface Manta_Core Manta_Image)
-IF(BUILD_DYNLT)
- TARGET_LINK_LIBRARIES(Manta_Model Manta_DynLT)
-ENDIF(BUILD_DYNLT)
+#IF(BUILD_DYNLT)
+# TARGET_LINK_LIBRARIES(Manta_Model Manta_DynLT)
+#ENDIF(BUILD_DYNLT)
+
Modified: trunk/Model/Groups/CMakeLists.txt
==============================================================================
--- trunk/Model/Groups/CMakeLists.txt (original)
+++ trunk/Model/Groups/CMakeLists.txt Thu Jul 20 22:56:02 2006
@@ -60,5 +60,5 @@
Groups/TimeSteppedParticles.cc
Groups/TimeSteppedParticles.h
)
- INCLUDE_DIRECTORIES(${FOUND_TEEM_INCLUDE})
+INCLUDE_DIRECTORIES(${FOUND_TEEM_INCLUDE})
ENDIF(BUILD_NRRDPARTICLES)
Modified: trunk/Model/Groups/TimeSteppedParticles.cc
==============================================================================
--- trunk/Model/Groups/TimeSteppedParticles.cc (original)
+++ trunk/Model/Groups/TimeSteppedParticles.cc Thu Jul 20 22:56:02 2006
@@ -1,9 +1,7 @@
#include <Core/Exceptions/InputError.h>
#include <Core/Exceptions/OutputError.h>
-#ifdef BUILD_DYNLT
-#include <DynLT/DynLTGridSpheres.h>
-#endif
+
#include <Model/Groups/TimeSteppedParticles.h>
#include <Model/Primitives/GridSpheres.h>
#include <Model/Readers/ParticleNRRD.h>
@@ -27,21 +25,9 @@
string::size_type pos=filename.find(".nrrd", 0);
if (pos != string::npos) {
ParticleNRRD pnrrd(filename);
-#ifdef BUILD_DYNLT
- if (queue) {
- add(new DynLTGridSpheres(queue, pnrrd.getParticleData(),
- pnrrd.getNParticles(), pnrrd.getNVars(),
ncells,
- depth, radius, ridx, cmap, cidx));
- } else {
-#else
- cerr<<"TimeSteppedParticles - DynLTGridSpheres is not supported\n";
-#endif
add(new GridSpheres(pnrrd.getParticleData(), pnrrd.getNParticles(),
pnrrd.getNVars(), ncells, depth, radius, ridx,
cmap,
cidx));
-#ifdef BUILD_DYNLT
- }
-#endif
return;
}
@@ -66,21 +52,11 @@
// Load the particle data
ParticleNRRD pnrrd(fname);
-#ifdef BUILD_DYNLT
- if (queue) {
- add(new DynLTGridSpheres(queue, pnrrd.getParticleData(),
- pnrrd.getNParticles(), pnrrd.getNVars(),
ncells,
- depth, radius, ridx, cmap, cidx));
- } else {
-#else
- cerr<<"TimeSteppedParticles - DynLTGridSpheres is not supported\n";
-#endif
+
add(new GridSpheres(pnrrd.getParticleData(), pnrrd.getNParticles(),
pnrrd.getNVars(), ncells, depth, radius, ridx,
cmap,
cidx));
-#ifdef BUILD_DYNLT
- }
-#endif
+
++nloaded;
}
Modified: trunk/scenes/CMakeLists.txt
==============================================================================
--- trunk/scenes/CMakeLists.txt (original)
+++ trunk/scenes/CMakeLists.txt Thu Jul 20 22:56:02 2006
@@ -107,5 +107,5 @@
# Lazily evaluated LTs for NRRD particle datasets
IF(BUILD_DYNLT)
ADD_LIBRARY(scene_dynlt dynlt.cc)
- TARGET_LINK_LIBRARIES(scene_dynlt ${MANTA_SCENE_LINK})
+ TARGET_LINK_LIBRARIES(scene_dynlt Manta_DynLT ${MANTA_SCENE_LINK})
ENDIF(BUILD_DYNLT)
Modified: trunk/scenes/dynlt.cc
==============================================================================
--- trunk/scenes/dynlt.cc (original)
+++ trunk/scenes/dynlt.cc Thu Jul 20 22:56:02 2006
@@ -7,6 +7,8 @@
#include <DynLT/DynLTQueue.h>
#include <DynLT/DynLTStatsCollector.h>
#include <DynLT/DynLTWorker.h>
+#include <DynLT/DynLTContext.h>
+#include <DynLT/DynTimeSteppedParticles.h>
#include <Interface/Context.h>
#include <Interface/LightSet.h>
#include <Interface/MantaInterface.h>
@@ -14,7 +16,6 @@
#include <Model/AmbientLights/ConstantAmbient.h>
#include <Model/Backgrounds/ConstantBackground.h>
#include <Model/Backgrounds/EnvMapBackground.h>
-#include <Model/Groups/TimeSteppedParticles.h>
#include <Model/Lights/PointLight.h>
#include <Model/Primitives/Sphere.h>
#include <Model/Readers/ParticleNRRD.h>
@@ -238,7 +239,7 @@
RegularColorMap* cmap=new RegularColorMap(type);
// Load particle data, add particles to group
- TimeSteppedParticles* tsteps=new TimeSteppedParticles(fname, ncells,
depth,
+ DynTimeSteppedParticles* tsteps=new DynTimeSteppedParticles(fname,
ncells, depth,
radius, ridx,
cmap, cidx,
queue);
- [MANTA] r1152 - in trunk: DynLT Model Model/Groups scenes, abe, 07/20/2006
Archive powered by MHonArc 2.6.16.