TRI_SURFACE_IO
Read and Write TRI_SURFACE 3D Graphics Files
TRI_SURFACE_IO is a C++ library which reads or writes the 3D graphics information stored in a pair of files that represent a TRI_SURFACE object, that is, a surface described as a collection of triangles.
Licensing:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
Languages:
TRI_SURFACE_IO is available in a C++ version and a FORTRAN90 version and a MATLAB version.
Related Data and Programs:
PLY_TO_TRI_SURFACE, a MATLAB program which extracts data from a PLY file and writes it to a TRI_SURFACE file.
TRI_SURFACE, a data directory which has some examples of TRI_SURFACE files.
TRI_SURFACE_DISPLAY, a MATLAB program which reads a TRI_SURFACE 3D graphics file and displays it in a 3D window.
TRI_SURFACE_DISPLAY_OPENGL, a C++ program which displays the 3D graphics information in a TRI_SURFACE file using OpenGL.
TRI_SURFACE_TO_PLY, a MATLAB program which extracts data from a TRI_SURFACE file and writes it to a PLY file.
Source Code:
- tri_surface_io.cpp, the source code.
- tri_surface_io.hpp, the include file.
- tri_surface_io.sh, commands to compile the source code.
Examples and Tests:
- tri_surface_io_prb.cpp, a sample calling program.
- tri_surface_io_prb.sh, commands to compile and run the sample program.
- tri_surface_io_prb_output.txt, the output file.
- sphere_nodes.txt, the node file for a TRI_SURFACE "sphere" triangular mesh.
- sphere_triangles.txt, the triangle file for a TRI_SURFACE "sphere" triangular mesh.
- cube_nodes.txt, the node file for a TRI_SURFACE "cube" triangular mesh.
- cube_triangles.txt, the triangle file for a TRI_SURFACE "cube" triangular mesh.
List of Routines:
- CH_CAP capitalizes a single character.
- CH_EQI is true if two characters are equal, disregarding case.
- CH_TO_DIGIT returns the integer value of a base 10 digit.
- DTABLE_CLOSE_WRITE closes a file to which a DTABLE was to be written.
- DTABLE_DATA_READ reads the data from a DTABLE file.
- DTABLE_DATA_WRITE writes data to a DTABLE file.
- DTABLE_HEADER_READ reads the header from a DTABLE file.
- DTABLE_HEADER_WRITE writes the header of a DTABLE file.
- DTABLE_WRITE writes information to a DTABLE file.
- FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
- FILE_ROW_COUNT counts the number of row records in a file.
- I4_MAX returns the maximum of two I4's.
- I4_MIN returns the smaller of two I4's.
- I4MAT_TRANSPOSE_PRINT prints an I4MAT, transposed.
- I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.
- ITABLE_DATA_READ reads data from an ITABLE file.
- ITABLE_DATA_WRITE writes data to an ITABLE file.
- ITABLE_HEADER_READ reads the header from an ITABLE file.
- ITABLE_HEADER_WRITE writes the header of an ITABLE file.
- ITABLE_WRITE writes information to an ITABLE file.
- R8_EPSILON returns the R8 roundoff unit.
- R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
- R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
- S_LEN_TRIM returns the length of a string to the last nonblank.
- S_TO_I4 reads an I4 from a string.
- S_TO_I4VEC reads an I4VEC from a string.
- S_TO_R8 reads an R8 from a string.
- S_TO_R8VEC reads an R8VEC from a string.
- S_WORD_COUNT counts the number of "words" in a string.
- TIMESTAMP prints the current YMDHMS date as a time stamp.
- TIMESTRING returns the current YMDHMS date as a string.
- TRI_SURFACE_PRINT prints graphics information from a pair of TRI_SURFACE files.
- TRI_SURFACE_READ reads graphics information from a pair of TRI_SURFACE files.
- TRI_SURFACE_SIZE determines the size of a TRI_SURFACE object.
- TRI_SURFACE_SIZE_PRINT prints sizes associated with a TRI_SURFACE file.
- TRI_SURFACE_WRITE writes graphics information to a pair of TRI_SURFACE files.
You can go up one level to the C++ source codes.
Last revised on 22 February 2009
http://people.sc.fsu.edu/~jburkardt/cpp_src/tri_surface_io/tri_surface_io.html