Package il.ac.idc.jdt
Class IOParsers
- java.lang.Object
-
- il.ac.idc.jdt.IOParsers
-
public class IOParsers extends Object
-
-
Constructor Summary
Constructors Constructor Description IOParsers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
exportCHTsin(DelaunayTriangulation dto, String tsinFile)
static void
exportSmf(List<Triangle> triangulation, File smfFile)
static void
exportSmf(List<Triangle> triangulation, OutputStream os)
static void
exportSmf(List<Triangle> triangulation, Writer writer)
static void
exportSmf(List<Triangle> triangulation, String smfFile)
static void
exportTsin(DelaunayTriangulation dto, File tsinFile)
static void
exportTsin(DelaunayTriangulation dto, OutputStream os)
static void
exportTsin(DelaunayTriangulation dto, Writer writer)
static void
exportTsin(DelaunayTriangulation dto, String tsinFile)
static List<Point>
readPoints(File file)
creates a Delaunay Triangulation from all the points in the suggested tsin file or from a smf file (off like). if the file name is .smf - read it as an smf file as try to read it as .tsin
Note: duplicated points are ignored!static List<Point>
readPoints(InputStream is)
static List<Point>
readPoints(String file)
-
-
-
Method Detail
-
readPoints
public static List<Point> readPoints(File file) throws IOException
creates a Delaunay Triangulation from all the points in the suggested tsin file or from a smf file (off like). if the file name is .smf - read it as an smf file as try to read it as .tsin
Note: duplicated points are ignored!
SMF file has an OFF like format (a face (f) is presented by the indexes of its points - starting from 1 - not from 0):
begin
v x1 y1 z1
...
v xn yn zn
f i11 i12 i13
...
f im1 im2 im3
end
The tsin text file has the following (very simple) format
vertices# (n)
x1 y1 z1
...
xn yn zn- Throws:
IOException
-
readPoints
public static List<Point> readPoints(String file) throws IOException
- Throws:
IOException
-
readPoints
public static List<Point> readPoints(InputStream is) throws IOException
- Throws:
IOException
-
exportSmf
public static void exportSmf(List<Triangle> triangulation, OutputStream os)
-
exportSmf
public static void exportSmf(List<Triangle> triangulation, File smfFile) throws IOException
- Throws:
IOException
-
exportSmf
public static void exportSmf(List<Triangle> triangulation, String smfFile) throws IOException
- Throws:
IOException
-
exportTsin
public static void exportTsin(DelaunayTriangulation dto, File tsinFile) throws IOException
- Throws:
IOException
-
exportTsin
public static void exportTsin(DelaunayTriangulation dto, String tsinFile) throws IOException
- Throws:
IOException
-
exportTsin
public static void exportTsin(DelaunayTriangulation dto, OutputStream os)
-
exportTsin
public static void exportTsin(DelaunayTriangulation dto, Writer writer)
-
exportCHTsin
public static void exportCHTsin(DelaunayTriangulation dto, String tsinFile) throws IOException
- Throws:
IOException
-
-