Skip to content

Commit f74ade2

Browse files
Merge pull request #1113 from mwestphal/compat_vtk_master
ttkWRLExporter: Update for new vtkVRMLExporter API
2 parents 7bea8bd + 6a7ed50 commit f74ade2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

core/vtk/ttkWRLExporter/ttkWRLExporter.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <vtkTransform.h>
2323
#include <vtkUnsignedCharArray.h>
2424
#include <vtkVRMLExporter.h>
25+
#include <vtkVersionMacros.h>
2526

2627
// base code includes
2728
#include <Debug.h>
@@ -145,7 +146,12 @@ TTKWRLEXPORTER_EXPORT void vtkVRMLExporter::WriteAnActor(vtkActor *anActor,
145146
fprintf(fp, " solid FALSE\n");
146147

147148
if(!pointDataWritten) {
149+
150+
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 4, 20250513)
151+
this->WritePointData(points, normals, tcoords, colors, false, fp);
152+
#else
148153
this->WritePointData(points, normals, tcoords, colors, fp);
154+
#endif
149155
pointDataWritten = 1;
150156
} else {
151157
fprintf(fp, " coord USE VTKcoordinates\n");
@@ -189,7 +195,13 @@ TTKWRLEXPORTER_EXPORT void vtkVRMLExporter::WriteAnActor(vtkActor *anActor,
189195
fprintf(fp, " geometry IndexedFaceSet {\n");
190196

191197
if(!pointDataWritten) {
198+
199+
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 4, 20250513)
200+
this->WritePointData(points, normals, tcoords, colors, false, fp);
201+
#else
192202
this->WritePointData(points, normals, tcoords, colors, fp);
203+
#endif
204+
193205
pointDataWritten = 1;
194206
} else {
195207
fprintf(fp, " coord USE VTKcoordinates\n");
@@ -238,7 +250,12 @@ TTKWRLEXPORTER_EXPORT void vtkVRMLExporter::WriteAnActor(vtkActor *anActor,
238250
fprintf(fp, " geometry IndexedLineSet {\n");
239251

240252
if(!pointDataWritten) {
253+
254+
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 4, 20250513)
255+
this->WritePointData(points, nullptr, nullptr, colors, false, fp);
256+
#else
241257
this->WritePointData(points, nullptr, nullptr, colors, fp);
258+
#endif
242259
} else {
243260
fprintf(fp, " coord USE VTKcoordinates\n");
244261

@@ -440,6 +457,9 @@ TTKWRLEXPORTER_EXPORT void
440457
vtkDataArray *normals,
441458
vtkDataArray *tcoords,
442459
vtkUnsignedCharArray *colors,
460+
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 4, 20250513)
461+
bool vtkNotUsed(cellData),
462+
#endif
443463
FILE *fp) {
444464

445465
double *p;

0 commit comments

Comments
 (0)