![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
00001 /**
00002 * MOAB, a Mesh-Oriented datABase, is a software component for creating,
00003 * storing and accessing finite element mesh data.
00004 *
00005 * Copyright 2004 Sandia Corporation. Under the terms of Contract
00006 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
00007 * retains certain rights in this software.
00008 *
00009 * This library is free software; you can redistribute it and/or
00010 * modify it under the terms of the GNU Lesser General Public
00011 * License as published by the Free Software Foundation; either
00012 * version 2.1 of the License, or (at your option) any later version.
00013 *
00014 */
00015
00016 //-----------------------------------------------------------------------------
00017 // Filename : ReadOBJ.hpp
00018 //
00019 // Purpose : Wavefront obj file reader
00020 //
00021 // Creators : Chelsea D'Angelo, Paul Wilson, Andrew Davis
00022 //
00023 // Date : 02/16
00024 //
00025 // Owner : Chelsea D'Angelo
00026 //-----------------------------------------------------------------------------
00027
00028 /**
00029 * This class will read in an obj file and populate a MOAB instance with the
00030 * vertex and connectivity information in the file. A specification for obj files
00031 * can be found here: https://en.wikipedia.org/wiki/Wavefront_.obj_file
00032 * This reader only supports a subset of the full file structure, namely,
00033 * object names, group names, vertices, and faces.
00034 *
00035 * Overview of the supported structure:
00036 *
00037 * Heading
00038 * Object line: o object_name
00039 * Group line: g group_name1
00040 * Vertex lines: v x y z
00041 * Face lines (tri): f v1 v2 v3
00042 * Face lines (quad): f v1 v2 v3 v4
00043 *
00044 * Lines that begin w/ anything other than 'o ', 'g ', 'v ', and 'f ' are not
00045 * supported. If a valid, but unsupported line is found, it will be ignored.
00046 * If an invalid line is found, an error will be produced.
00047 * Face lines that contain 'vertex\texture\normal' are handled by ignoring the
00048 * texture and normal
00049 *
00050 *
00051 * A new meshset will be created for each object or group in the file.
00052 * Each object and group must have a name, or the line will be ignored.
00053 * Groups are thought to be collections of elements with no dimension or category and
00054 * will therefore only be assigned name and id tags.
00055 * Objects are thought to be closed surfaces. A surface meshset will be
00056 * created for each object. A volume meshset that directly corresponds
00057 * to the surface meshset will also be created. These will have name, id,
00058 * categorty, and dimension tags. A parent-child relationship exists
00059 * between the volume and surface meshsets.
00060 * Vertices will be created and added to a global vertex meshset.
00061 * Triangular faces will be created and added as members of the surface meshets.
00062 */
00063
00064 #ifndef READ_OBJ_HPP
00065 #define READ_OBJ_HPP
00066
00067 #ifndef IS_BUILDING_MB
00068 #error "ReadOBJ.hpp isn't supposed to be included into an application"
00069 #endif
00070
00071 #include
00072 #include
00073 #include
00074 #include
00075 #include