public class STLFormatter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.text.DecimalFormat |
FLOAT_FMT
A DecimalFormat that will be used to format numbers to 5 decimal
places.
|
Constructor and Description |
---|
STLFormatter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
toSTLFormat(java.util.Vector<Triangle3DFloat> triangles,
java.lang.String objName)
This method turns a vector of Triangle3DFloat into a string
representing a STL file.
|
static java.lang.String |
toSTLFormat(java.util.Vector<Triangle3DFloat> triangles,
java.lang.String objName,
float scale)
This method turns a vector of Triangle3DFloat into a string
representing a STL file.
|
private static final java.text.DecimalFormat FLOAT_FMT
public static java.lang.String toSTLFormat(java.util.Vector<Triangle3DFloat> triangles, java.lang.String objName, float scale)
triangles
- A vector of triangles. The vector may be obtained fromobjName
- The object name to be used inside the obj file.scale
- A scale to multiply each point by.MarchingCubes.triangulateHull(float, float, int, float, float, int, float, float, int, frink.graphics.Field3DFloat, float)
public static java.lang.String toSTLFormat(java.util.Vector<Triangle3DFloat> triangles, java.lang.String objName)
triangles
- A vector of triangles. The vector may be obtained fromobjName
- The object name to be used inside the obj file.MarchingCubes.triangulateHull(float, float, int, float, float, int, float, float, int, frink.graphics.Field3DFloat, float)