yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12517
[Branch ~yade-pkg/yade/git-trunk] Rev 3781: Respect VTK6 in PotentialParticles.
------------------------------------------------------------
revno: 3781
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Sat 2016-01-23 12:27:55 +0100
message:
Respect VTK6 in PotentialParticles.
modified:
pkg/common/Gl1_PotentialParticle.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/common/Gl1_PotentialParticle.cpp'
--- pkg/common/Gl1_PotentialParticle.cpp 2016-01-22 22:27:43 +0000
+++ pkg/common/Gl1_PotentialParticle.cpp 2016-01-23 11:27:55 +0000
@@ -399,8 +399,12 @@
sample->ComputeNormalsOff();
//sample->Update();
vtkSmartPointer<vtkContourFilter> contours = vtkContourFilter::New();
- contours->SetInput(sample->GetOutput());
- contours->SetNumberOfContours(1);
+ #ifdef YADE_VTK6
+ contours->SetInputData(sample->GetOutput());
+ #else
+ contours->SetInput(sample->GetOutput());
+ #endif
+ contours->SetNumberOfContours(1);
contours->SetValue(0,0.0);
vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();
contours->Update();
@@ -434,7 +438,11 @@
AngleAxisr aa(orientation);
//Vector3r axis = aa.axis();
vtkSmartPointer<vtkTransformPolyDataFilter> transformFilter = vtkSmartPointer<vtkTransformPolyDataFilter>::New();
- transformFilter->SetInput( polydata );
+ #ifdef YADE_VTK6
+ transformFilter->SetInputData( polydata );
+ #else
+ transformFilter->SetInput( polydata );
+ #endif
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
transformFilter->SetTransform( transform );
@@ -488,7 +496,11 @@
writerA->SetDataModeToAscii();
string fv=fileName+"vel."+std::to_string(scene->iter)+".vtu";
writerA->SetFileName(fv.c_str());
- writerA->SetInput(pbUg);
+ #ifdef YADE_VTK6
+ writerA->SetInputData(pbUg);
+ #else
+ writerA->SetInput(pbUg);
+ #endif
writerA->Write();
//writerA->Delete();
//pbUg->Delete();
@@ -504,7 +516,11 @@
writerA->SetDataModeToAscii();
string fv=fileName+"Id."+std::to_string(scene->iter)+".vtu";
writerA->SetFileName(fv.c_str());
- writerA->SetInput(pbUg);
+ #ifdef YADE_VTK6
+ writerA->SetInputData(pbUg);
+ #else
+ writerA->SetInput(pbUg);
+ #endif
writerA->Write();
//writerA->Delete();
//pbUg->Delete();
@@ -542,7 +558,11 @@
writerB->SetDataModeToAscii();
string fcontact=fileName+"contactPoint."+std::to_string(scene->iter)+".vtu";
writerB->SetFileName(fcontact.c_str());
- writerB->SetInput(pbUgCP);
+ #ifdef YADE_VTK6
+ writerB->SetInputData(pbUgCP);
+ #else
+ writerB->SetInput(pbUgCP);
+ #endif
writerB->Write();
//writerB->Delete();
//pbUgCP->Delete();