Update of /cvsroot/echempp/GUI/Visualization
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3254
Modified Files:
vtkGraph.cpp vtkGraph.hpp
Log Message:
Patched to use with VTK 4 or VTK 5
Index: vtkGraph.hpp
===================================================================
RCS file: /cvsroot/echempp/GUI/Visualization/vtkGraph.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** vtkGraph.hpp 10 Dec 2007 17:06:09 -0000 1.14
--- vtkGraph.hpp 19 Dec 2007 16:14:40 -0000 1.15
***************
*** 30,33 ****
--- 30,34 ----
#include "Visualization/vtkAxisSystem.hpp"
#include "Visualization/vtkColor.hpp"
+ #include "vtkVersion.h"
namespace GUI
***************
*** 159,163 ****
--- 160,166 ----
{
//std::cout << "VtkGraph<D>::draw()" << std::endl;
+ #if VTK_MAJOR_VERSION > 4
_renderer->RemoveAllViewProps();
+ #endif
this->drawAxisSystem();
this->drawBackground();
***************
*** 196,200 ****
--- 199,207 ----
for(unsigned int i = 0; i < actors.size(); ++i)
{
+ #if VTK_MAJOR_VERSION > 4
_renderer->AddViewProp( actors[i] );
+ #else
+ _renderer->AddProp( actors[i] );
+ #endif
}
std::cout << "VtkGraph<D>::drawAxisSystem()" << std::endl;
Index: vtkGraph.cpp
===================================================================
RCS file: /cvsroot/echempp/GUI/Visualization/vtkGraph.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** vtkGraph.cpp 10 Dec 2007 17:06:08 -0000 1.6
--- vtkGraph.cpp 19 Dec 2007 16:14:39 -0000 1.7
***************
*** 55,59 ****
--- 55,63 ----
for(unsigned int i = 0; i < actors.size(); ++i)
{
+ #if VTK_MAJOR_VERSION > 4
ren->AddViewProp( actors[i] );
+ #else
+ ren->AddProp( actors[i] );
+ #endif
}
***************
*** 74,78 ****
--- 78,86 ----
for(unsigned int i = 0; i < actors.size(); ++i)
{
+ #if VTK_MAJOR_VERSION > 4
ren->AddViewProp( actors[i] );
+ #else
+ ren->AddProp( actors[i] );
+ #endif
}
|