[vtkusers] help converting c++ code to java
jaki19
nour_sn at hotmail.fr
Sun Mar 5 03:47:36 EST 2017
Hi everyone,
How I can write this C++ code in java please (particularly the for loop
part)??
vtkSmartPointer<vtkPolyData> polyData = polyDataReader->GetOutput();
int numberOfLines = polyData->GetNumberOfLines();
vtkSmartPointer<vtkPoints> points = polyData->GetPoints();
vtkCellArray *cells = polyData->GetLines();
for (cells->InitTraversal();
cells->GetNextCell(numberOfPoints, indices); lineCount++) {
cout << "<polygon points=\"";
for(vtkIdType i = 0; i < numberOfPoints; i++) {
double point[3];
points->GetPoint(indices[i], point);
std::cout << (point[0] - bounds[0]) << ", " <<
(point[1] - bounds[2]) << " ";
}
Tks
--
View this message in context: http://vtk.1045678.n5.nabble.com/help-converting-c-code-to-java-tp5742360.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list