HE_Mesh
5.0.0
|
Classes | |
class | DefaultSTLColorModel |
class | MaterialiseSTLColorModel |
class | NoColorModel |
interface | STLColorModel |
Public Member Functions | |
HET_WriterSTL () | |
HET_WriterSTL (final STLColorModel cm, final int bufSize) | |
void | beginSave (final OutputStream stream, final int numFaces) |
void | beginSave (final String fn, final String name, final int numFaces) |
void | endSave () |
void | face (final WB_Coord a, final WB_Coord b, final WB_Coord c, final WB_Coord normal) |
void | face (final WB_Coord a, final WB_Coord b, final WB_Coord c, final WB_Coord normal, final int rgb) |
void | setScale (final float s) |
void | setScale (final WB_Coord s) |
void | useInvertedNormals (final boolean state) |
Static Public Member Functions | |
static OutputStream | createOutputStream (final File file) throws IOException |
static void | createDirectories (final File file) |
Static Public Attributes | |
static final int | DEFAULT_RGB = -1 |
static final STLColorModel | NONE = new NoColorModel() |
static final STLColorModel | DEFAULT = new DefaultSTLColorModel() |
static final STLColorModel | MATERIALISE |
static final int | DEFAULT_BUFFER = 0x10000 |
Protected Member Functions | |
void | writeFloat (final float a) throws IOException |
void | writeHeader (final int num) throws IOException |
void | writeInt (final int a) throws IOException |
void | writeScaledVector (final WB_Coord v) |
void | writeShort (final int a) throws IOException |
void | writeVector (final WB_Coord v) |
Protected Attributes | |
OutputStream | ds |
byte[] | buf = new byte[4] |
int | bufferSize |
WB_Vector | scale = new WB_Vector(1, 1, 1) |
boolean | useInvertedNormals = false |
STLColorModel | colorModel |
Private Member Functions | |
final void | prepareBuffer (final int a) |
A simple, but flexible and memory efficient exporter for binary STL files. Custom color support is implemented via the STLcolorModel interface and the exporter comes with the 2 most common format variations defined by the DEFAULT and MATERIALISE constants.
The minimal design of this exporter means it does not build an extra list of faces in RAM and so is able to easily export models with millions of faces.
wblut.hemesh.HET_WriterSTL.HET_WriterSTL | ( | ) |
wblut.hemesh.HET_WriterSTL.HET_WriterSTL | ( | final STLColorModel | cm, |
final int | bufSize | ||
) |
cm | |
bufSize |
void wblut.hemesh.HET_WriterSTL.beginSave | ( | final OutputStream | stream, |
final int | numFaces | ||
) |
stream | |
numFaces |
void wblut.hemesh.HET_WriterSTL.beginSave | ( | final String | fn, |
final String | name, | ||
final int | numFaces | ||
) |
fn | |
name | |
numFaces |
|
static |
file |
|
static |
file |
IOException |
void wblut.hemesh.HET_WriterSTL.endSave | ( | ) |
void wblut.hemesh.HET_WriterSTL.face | ( | final WB_Coord | a, |
final WB_Coord | b, | ||
final WB_Coord | c, | ||
final WB_Coord | normal | ||
) |
a | |
b | |
c | |
normal |
void wblut.hemesh.HET_WriterSTL.face | ( | final WB_Coord | a, |
final WB_Coord | b, | ||
final WB_Coord | c, | ||
final WB_Coord | normal, | ||
final int | rgb | ||
) |
a | |
b | |
c | |
normal | |
rgb |
|
private |
a |
void wblut.hemesh.HET_WriterSTL.setScale | ( | final float | s | ) |
s |
void wblut.hemesh.HET_WriterSTL.setScale | ( | final WB_Coord | s | ) |
s |
void wblut.hemesh.HET_WriterSTL.useInvertedNormals | ( | final boolean | state | ) |
state |
|
protected |
a |
IOException |
|
protected |
num |
IOException |
|
protected |
a |
IOException |
|
protected |
v |
|
protected |
a |
IOException |
|
protected |
v |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
protected |
|
static |
|
static |
|
protected |