License:

HexEx is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your
option) any later version.

HexEx is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with HexEx.  If not, see <http://www.gnu.org/licenses/>.

Introduction:

This is an implemenation of the HexEx algorithm by Lyon et al. (http://dx.doi.org/10.1145/2897824.2925976)
The HexEx algorithm is designed to robustly extract a hexahedral mesh from a given tetrahedral mesh and a parametrization.

This tool reads a tetrahedral mesh and a paremetrization from an input file and stores the extracted hexahedral mesh in ovm format of OpenVolumeMesh (www.openvolumemesh.org).

Usage:
./hexex <inFile> <outFile>

Example:
./hexex example.hexex output.ovm

Input File Format:

n
v1_x v1_y v1_z
v2_x v2_y v2_z
...
vn_x vn_y vn_z
m
c1_i1 c1_i2 c1_i3 c1_i4 p_c1_i1_u p_c1_i1_v p_c1_i1_w p_c1_i2_u p_c1_i2_v p_c1_i2_w p_c1_i3_u p_c1_i3_v p_c1_i3_w p_c1_i4_u p_c1_i4_v p_c1_i4_w
c2_i1 c2_i2 c2_i3 c2_i4 p_c2_i1_u p_c2_i1_v p_c2_i1_w p_c2_i2_u p_c2_i2_v p_c2_i2_w p_c2_i3_u p_c2_i3_v p_c2_i3_w p_c2_i4_u p_c2_i4_v p_c2_i4_w
...
cm_i1 cm_i2 cm_i3 cm_i4 p_cm_i1_u p_cm_i1_v p_cm_i1_w p_cm_i2_u p_cm_i2_v p_cm_i2_w p_cm_i3_u p_cm_i3_v p_cm_i3_w p_cm_i4_u p_cm_i4_v p_cm_i4_w 

The input file starts with an integer n representing the number of vertices of the input mesh. It follow the n positions of the vertices, each as three floating point values in its own line.  After that there is again an integer m representing the number of tets which are to be read, followed by m tet definitions, each in its own line.  A tet definition consists of a line starting with 4 integers, which reference the vertices.  The vertices of a tet should be ordered such that if p1, p2, p3 and p4 are the corresponding positions, the determinant det(p2-p1,p3-p1,p4-p1) is positive.  The four vertex indices are followed by the four corresponding parameter locations, each specified as three floating point numbers. 
An example file should have been shipped with this readme.  

