public class MeshDecoder
extends java.lang.Object
Remark: recall that
-) all vertices are ordered according to a Depth first traversal of the red tree (rooted at v0)
-) the two outer vertices v0 and v1 are ordered as usual: their numbers are '0' and '1' -) v2 is the last vertex: it has index n-1
-) the inner face incident to (v0, v1) is (0, 1, 2) -) the outer face is: (1, 0, n-1)
Modifier and Type | Field and Description |
---|---|
boolean |
binaryFormat |
float[] |
coordF |
boolean |
noAdditionalMemory |
Constructor and Description |
---|
MeshDecoder(java.lang.String inputFile,
boolean noAdditionalMemory,
boolean binaryFormat)
Initialize the decoder: the triangulation is assumed to be encoded by a pair of red and black words
stored in an input file in text format
|
Modifier and Type | Method and Description |
---|---|
CompactTriangleMesh_6nNew |
decode()
Decode and construct the compact representation (using 6n references)
|
StringEncoderTwoWords |
readEncodingFromBinaryFile(java.lang.String inputFile)
Read the vertex coordinates and the red and black words from a binary file
|
StringEncoderTwoWords |
readEncodingFromFile(java.lang.String inputFile)
Read the vertex coordinates and the red and black words from a text file
|
public float[] coordF
public boolean noAdditionalMemory
public boolean binaryFormat
public MeshDecoder(java.lang.String inputFile, boolean noAdditionalMemory, boolean binaryFormat)
public StringEncoderTwoWords readEncodingFromFile(java.lang.String inputFile)
public StringEncoderTwoWords readEncodingFromBinaryFile(java.lang.String inputFile)
Warning: it works only for 3d triangle meshes (without boundaries)
The input format is the following
n
x1 y1 z1
x2 y2 z2
... ... ...
010011... // the red word
000100... // the black word
All numbers (integers and floats) are encoding on 32 bits (four bytes each) spaces between numbers and other characters are not encoded
public CompactTriangleMesh_6nNew decode()