diff --git a/README.md b/README.md index ec02f3e..f902a0c 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,48 @@ # VTK-JAVA-Natives -This library makes it easy to access [vtk](www.vtk.org) from java. -It automatically extracts and loads all the required native libraries. +This library makes it easy to access [vtk](www.vtk.org) from java. +It automatically extracts and loads all the required native libraries through maven artifacts. + +## Add VTK to your Java project + +```xml + + ch.unibas.cs.gravis + vtkjavanativesall + 0.1.1 + +``` +This brings VTK 9.1 libraries for Windows, Linux and macOS+Intel (M1 will come later). It also brings JOGL and Glugen 2.4-rc4. + +Unpacking and loading native libraries requires this line at the beginning of a program : + +```java +VtkNativeLibraries.initialize(new File(System.getProperty("java.io.tmpdir"))); +``` + +Using a temporary directory is not compulsory, this is just an example. -##### Usage An example of how this library can be used is given in ```Main.java```, which is located -in the `src` directory. +in the `src` directory. -##### Structure +## Build this project + +### Structure The project is divided in the following modules: * The logic for initialization and loading the libraries can be found in `vtkJavaNatvies` * `vtkJar` is a dummy module, whose purpose is to manage `vtk.jar` as a dependency -* The modules `vtkJavaNativesPLATFORMImpl` are platform specific packages, which contain all the - native libraries for the corresponding platform in the resource folder. +* The modules `vtkJavaNativesPLATFORMImpl` are platform specific packages, which contain all the + native libraries for the corresponding platform in the resource folder. + +### Build project + +``` +sbt run +``` + +### Add more platform build +The binaries in this project are listed [here](https://github.com/jzy3d/vtk-java-wrapper).