Text archives Help
- From: knolla@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1141 - in branches/Manta-knolla-isohack: Model/Primitives UserInterface
- Date: Thu, 6 Jul 2006 09:48:20 -0600 (MDT)
Author: knolla
Date: Thu Jul 6 09:48:20 2006
New Revision: 1141
Modified:
branches/Manta-knolla-isohack/Model/Primitives/IsosurfaceGridVolume.h
branches/Manta-knolla-isohack/Model/Primitives/OctreeVolume.h
branches/Manta-knolla-isohack/UserInterface/XWindowUI.cc
branches/Manta-knolla-isohack/UserInterface/XWindowUI.h
Log:
Modified:
branches/Manta-knolla-isohack/Model/Primitives/IsosurfaceGridVolume.h
==============================================================================
--- branches/Manta-knolla-isohack/Model/Primitives/IsosurfaceGridVolume.h
(original)
+++ branches/Manta-knolla-isohack/Model/Primitives/IsosurfaceGridVolume.h
Thu Jul 6 09:48:20 2006
@@ -12,11 +12,11 @@
#include <Model/Primitives/OctreeVolume.h>
//generate the octree data
-//#define TEST_OCTDATA
+#define TEST_OCTDATA
//test the octree data
-//#define USE_OCTREE_DATA
-//#define USE_OTD_NEIGHBOR_FIND
+#define USE_OCTREE_DATA
+#define USE_OTD_NEIGHBOR_FIND
typedef unsigned char ST;
Modified: branches/Manta-knolla-isohack/Model/Primitives/OctreeVolume.h
==============================================================================
--- branches/Manta-knolla-isohack/Model/Primitives/OctreeVolume.h
(original)
+++ branches/Manta-knolla-isohack/Model/Primitives/OctreeVolume.h Thu
Jul 6 09:48:20 2006
@@ -172,6 +172,14 @@
current_timestep = 0;
}
+ inline void decrement_timestep()
+ {
+ if (current_timestep > 0)
+ current_timestep--;
+ else
+ current_timestep = num_timesteps - 1;
+ }
+
inline int get_timestep() const
{
return current_timestep;
Modified: branches/Manta-knolla-isohack/UserInterface/XWindowUI.cc
==============================================================================
--- branches/Manta-knolla-isohack/UserInterface/XWindowUI.cc (original)
+++ branches/Manta-knolla-isohack/UserInterface/XWindowUI.cc Thu Jul 6
09:48:20 2006
@@ -431,6 +431,12 @@
register_key(0, XStringToKeysym("a"),
"toggle animation",
Callback::create(this, &XWindowUI::animate));
+ register_key(0, XStringToKeysym("t"),
+ "increment/decrement timestep",
+ Callback::create(this, &XWindowUI::timestep));
+ register_key(0, XStringToKeysym("T"),
+ "increment/decrement timestep",
+ Callback::create(this, &XWindowUI::timestep));
register_key(0, XStringToKeysym("i"),
"increase/decrease generic user value",
Callback::create(this, &XWindowUI::uservalue));
@@ -494,6 +500,25 @@
cerr << "animation is ON." << endl;
else
cerr << "animation is OFF." << endl;
+}
+
+void XWindowUI::timestep(unsigned int, unsigned long key, int)
+{
+#ifdef OCTREE_HACK
+ std::vector<void*> guiObjects =
rtrt_interface->getScene()->getGUIObjects();
+ OctreeVolume* ov = (OctreeVolume*)(guiObjects[0]);
+ if(key == XStringToKeysym("t"))
+ {
+ ov->increment_timestep();
+ }
+ else
+ {
+ ov->decrement_timestep();
+ }
+ char str[32];
+ sprintf(str, "timestep = %3d\r", ov->get_timestep());
+ cerr << str;
+#endif
}
void XWindowUI::uservalue(unsigned int, unsigned long key, int)
Modified: branches/Manta-knolla-isohack/UserInterface/XWindowUI.h
==============================================================================
--- branches/Manta-knolla-isohack/UserInterface/XWindowUI.h (original)
+++ branches/Manta-knolla-isohack/UserInterface/XWindowUI.h Thu Jul 6
09:48:20 2006
@@ -74,7 +74,8 @@
void autoview(unsigned int, unsigned long, int);
void animate(unsigned int, unsigned long, int);
void uservalue(unsigned int, unsigned long, int);
-
+ void timestep(unsigned int, unsigned long, int);
+
void next_bookmark(unsigned int, unsigned long, int);
void add_bookmark(unsigned int, unsigned long, int);
void output_camera(unsigned int, unsigned long, int);
- [MANTA] r1141 - in branches/Manta-knolla-isohack: Model/Primitives UserInterface, knolla, 07/06/2006
Archive powered by MHonArc 2.6.16.