public class WavefrontObj
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, and will eliminate trailing zeroes.
|
Constructor and Description |
---|
WavefrontObj() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
toObjFormat(java.util.Vector<Triangle3DFloat> triangles,
java.lang.String objName)
This method turns a vector of Triangle3DFloat into a string
representing a Wavefront obj file.
|
static java.lang.String |
toObjFormat(java.util.Vector<Triangle3DFloat> triangles,
java.lang.String objName,
float scale)
This method turns a vector of Triangle3DFloat into a string
representing a Wavefront obj file.
|
static java.lang.String |
toObjFormatOld(java.util.Vector<Triangle3DFloat> triangles,
java.lang.String objName,
float scale)
Deprecated.
|
private static final java.text.DecimalFormat FLOAT_FMT
public static java.lang.String toObjFormat(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)
public static java.lang.String toObjFormat(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 triangle by.MarchingCubes.triangulateHull(float, float, int, float, float, int, float, float, int, frink.graphics.Field3DFloat, float)
public static java.lang.String toObjFormatOld(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 triangle by.MarchingCubes.triangulateHull(float, float, int, float, float, int, float, float, int, frink.graphics.Field3DFloat, float)