]> gerrit.simantics Code Review - simantics/3d.git/blob - vtk/src/vtk/vtkSettings.java
Editor internal toolbar for Plant3D editor
[simantics/3d.git] / vtk / src / vtk / vtkSettings.java
1 package vtk;
2
3 import java.util.Properties;
4 import java.util.StringTokenizer;
5
6 public class vtkSettings
7 {
8   private static String GetVTKBuildLibDir() { return "C:/dev/VTK-8.2.0/win64/bin"; }
9   private static String GetVTKInstallLibDir() { return "C:/Program Files/VTK/"; }
10
11   private static String[] Split(String str, String sep)
12     {
13     StringTokenizer st = new StringTokenizer(str, sep);
14     int size = st.countTokens();
15     String[] res = new String[size];
16     int cnt = 0;
17     while (st.hasMoreTokens())
18       {
19       res[cnt] = st.nextToken();
20       cnt ++;
21       }
22     return res;
23     }
24
25   public static String GetVTKLibraryDir()
26     {
27     String lpath = null;
28     Properties p = System.getProperties();
29     String path_separator = p.getProperty("path.separator");
30     String s = p.getProperty("java.class.path");
31     String[] paths = vtkSettings.Split(s, path_separator);
32     int cc;
33     for ( cc = 0; cc < paths.length; cc ++ )
34       {
35       if ( paths[cc].endsWith("vtk.jar") )
36         {
37         lpath = paths[cc].substring(0, paths[cc].length()-"vtk.jar".length()-1);
38         }
39       }
40     if ( lpath == null )
41       {
42       lpath = vtkSettings.GetVTKInstallLibDir();
43       }
44     return lpath;
45     }
46
47   public static String[] GetKits()
48     {
49     return vtkSettings.Split("CommonCore;CommonMath;CommonMisc;CommonSystem;CommonTransforms;CommonDataModel;CommonColor;CommonExecutionModel;CommonComputationalGeometry;FiltersCore;FiltersGeneral;ImagingCore;ImagingFourier;FiltersStatistics;FiltersExtraction;InfovisCore;FiltersGeometry;FiltersSources;RenderingCore;RenderingFreeType;RenderingContext2D;ChartsCore;IOCore;IOLegacy;IOXMLParser;DomainsChemistry;RenderingOpenGL2;DomainsChemistryOpenGL2;IOXML;ParallelCore;FiltersAMR;FiltersFlowPaths;FiltersGeneric;ImagingSources;FiltersHybrid;FiltersHyperTree;ImagingGeneral;FiltersImaging;FiltersModeling;FiltersParallel;FiltersParallelImaging;FiltersPoints;FiltersProgrammable;FiltersSMP;FiltersSelection;FiltersTexture;FiltersTopology;FiltersVerdict;IOImage;ImagingHybrid;InfovisLayout;InteractionStyle;ImagingColor;RenderingAnnotation;RenderingVolume;InteractionWidgets;ViewsCore;GeovisCore;IOAMR;IOAsynchronous;IOCityGML;IOEnSight;IOExodus;RenderingGL2PSOpenGL2;IOExport;IOExportOpenGL2;IOExportPDF;IOGeometry;IOImport;IOInfovis;IOLSDyna;IOMINC;IOMovie;IONetCDF;IOPLY;IOParallel;IOParallelXML;IOSQL;IOSegY;IOTecplotTable;IOVeraOut;IOVideo;ImagingMath;ImagingMorphological;ImagingStatistics;ImagingStencil;InteractionImage;RenderingContextOpenGL2;RenderingImage;RenderingLOD;RenderingLabel;RenderingVolumeOpenGL2;ViewsContext2D;ViewsInfovis", ";");
50     }
51 }