Reads a vtkPolyData object from a VTK XML PolyData (.vtp) file using
VTK's XML reader. Both ASCII and binary (including binary-appended) formats
are supported.
Value
A mesh3d object. $vb is a 4×N matrix of homogeneous vertex
coordinates; $it is a 3×M matrix of 1-based triangle indices.
For point-cloud VTP files (no polygon cells), $it is a 3×0 empty
matrix.
Examples
f <- system.file("testdata", "sphere_open.vtp", package = "vespa")
mesh <- read_vtp(f)
print(mesh)
#> <mesh3d> 162 vertices 319 faces