## -----------------------------------------------------------------------------
#| label: setup
library(rvtk)


## -----------------------------------------------------------------------------
VtkVersion()
CppFlags()


## ----eval = FALSE-------------------------------------------------------------
# # from the root of your package (e.g. yourpackage/)
# rvtk::use_rvtk()


## -----------------------------------------------------------------------------
modules = NULL


## ----eval = FALSE-------------------------------------------------------------
# rvtk::use_rvtk(
#   modules = c(
#     "vtkIOLegacy",
#     "vtkCommonCore",
#     "vtkCommonDataModel"
#   )
# )


## -----------------------------------------------------------------------------
# flags for just the I/O + core modules
LdFlags(modules = c("vtkIOLegacy", "vtkCommonCore", "vtkCommonDataModel"))


## -----------------------------------------------------------------------------
# modules available in this VTK installation (pre-built archives ship the
# complete set recorded in vtk_modules.txt; system VTK is derived from the
# recorded linker flags)
available_modules()


## ----eval = FALSE-------------------------------------------------------------
# # in a fresh R session, after R CMD INSTALL
# library(yourpackage)
# yourpackage::vtk_poly_data_npoints() # expect 0: a brand-new vtkPolyData has no points

