#include <ReadOBJ.hpp>
Public Member Functions | |
ErrorCode | load_file (const char *file_name, const EntityHandle *file_set, const FileOptions &opts, const SubsetList *subset_list=0, const Tag *file_id_tag=0) |
Load mesh from a file. More... | |
ErrorCode | read_tag_values (const char *file_name, const char *tag_name, const FileOptions &opts, std::vector< int > &tag_values_out, const SubsetList *subset_list=0) |
Read tag values from a file. More... | |
ReadOBJ (Interface *impl=NULL) | |
Constructor. More... | |
virtual | ~ReadOBJ () |
Destructor. More... | |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
factory method More... | |
Private Member Functions | |
keyword_type | get_keyword (std::vector< std::string > tokens) |
template<typename T > | |
std::string | match (const std::string &token, std::map< std::string, T > &tokenList) |
void | tokenize (const std::string &str, std::vector< std::string > &tokens, const char *delimiters) |
ErrorCode | create_new_object (std::string object_name, int object_id, EntityHandle &curr_obj_meshset) |
ErrorCode | create_new_group (std::string object_name, int curr_object, EntityHandle &object_meshset) |
ErrorCode | create_new_vertex (std::vector< std::string > v_tokens, EntityHandle &vertex_eh) |
ErrorCode | create_new_face (std::vector< std::string > f_tokens, const std::vector< EntityHandle > &vertex_list, EntityHandle &face_eh) |
ErrorCode | split_quad (std::vector< std::string > f_tokens, std::vector< EntityHandle > &vertex_list, Range &face_eh) |
ErrorCode | create_tri_faces (std::vector< EntityHandle > quad_vert_eh, Range &face_eh) |
Private Attributes | |
ReadUtilIface * | readMeshIface |
Interface * | MBI |
interface instance More... | |
GeomTopoTool * | myGeomTool |
Tag | geom_tag |
Tag | id_tag |
Tag | name_tag |
Tag | category_tag |
Tag | faceting_tol_tag |
Tag | geometry_resabs_tag |
Tag | obj_name_tag |
Static Private Attributes | |
static const char * | delimiters = " " |
Definition at line 119 of file ReadOBJ.hpp.
moab::ReadOBJ::ReadOBJ | ( | Interface * | impl = NULL | ) |
Constructor.
Definition at line 63 of file ReadOBJ.cpp.
References category_tag, CATEGORY_TAG_NAME, CATEGORY_TAG_SIZE, ErrorCode, faceting_tol_tag, GEOM_DIMENSION_TAG_NAME, geom_tag, geometry_resabs_tag, moab::Interface::globalId_tag(), id_tag, MB_CHK_ERR_RET, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MBI, myGeomTool, name_tag, NAME_TAG_NAME, NAME_TAG_SIZE, obj_name_tag, moab::Interface::query_interface(), readMeshIface, and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 94 of file ReadOBJ.cpp.
References MBI, myGeomTool, readMeshIface, and moab::Interface::release_interface().
|
private |
Definition at line 458 of file ReadOBJ.cpp.
References face::conn, moab::Interface::create_element(), ErrorCode, MB_CHK_SET_ERR, MBI, and MBTRI.
Referenced by load_file().
|
private |
Definition at line 420 of file ReadOBJ.cpp.
References moab::Interface::create_meshset(), ErrorCode, id_tag, MB_CHK_SET_ERR, MBI, MESHSET_SET, name_tag, and moab::Interface::tag_set_data().
Referenced by load_file().
|
private |
Definition at line 369 of file ReadOBJ.cpp.
References moab::Interface::add_parent_child(), category_tag, moab::Interface::create_meshset(), dim, ErrorCode, moab::geom_category, moab::geom_name, geom_tag, id_tag, MB_CHK_SET_ERR, MBI, MESHSET_SET, myGeomTool, name_tag, obj_name_tag, moab::GeomTopoTool::set_sense(), and moab::Interface::tag_set_data().
Referenced by load_file().
|
private |
Definition at line 440 of file ReadOBJ.cpp.
References vertex::coord, moab::Interface::create_vertex(), ErrorCode, MB_CHK_SET_ERR, and MBI.
Referenced by load_file().
|
private |
Definition at line 514 of file ReadOBJ.cpp.
References moab::Interface::create_element(), ErrorCode, moab::Range::insert(), MBI, and MBTRI.
Referenced by split_quad().
|
static |
factory method
Definition at line 41 of file ReadOBJ.cpp.
References iface, and ReadOBJ().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 297 of file ReadOBJ.cpp.
References moab::face_start, moab::group_start, match(), moab::object_start, moab::valid_unsupported, and moab::vertex_start.
Referenced by load_file().
|
virtual |
Load mesh from a file.
Method all readers must provide to import a mesh.
file_name | The file to read. |
file_set | Optional pointer to entity set representing file. If this is not NULL, reader may optionally tag the pointed-to set with format-specific meta-data. |
subset_list | An optional struct pointer specifying the tags identifying entity sets to be read. |
file_id_tag | If specified, reader should store for each entity it reads, a unique integer ID for this tag. |
Implements moab::ReaderIface.
Definition at line 115 of file ReadOBJ.cpp.
References moab::Interface::add_entities(), moab::Interface::create_meshset(), create_new_face(), create_new_group(), create_new_object(), create_new_vertex(), delimiters, ErrorCode, moab::face_start, get_keyword(), moab::group_start, input_file, MB_CHK_ERR, MB_CHK_SET_ERR, MB_FILE_DOES_NOT_EXIST, MB_SET_ERR, MB_SUCCESS, MB_UNSUPPORTED_OPERATION, MBI, MESHSET_SET, moab::object_start, split_quad(), tokenize(), moab::valid_unsupported, and moab::vertex_start.
|
private |
Definition at line 344 of file ReadOBJ.cpp.
References OBJ_UNDEFINED.
Referenced by get_keyword().
|
virtual |
Read tag values from a file.
Read the list if all integer tag values from the file for a tag that is a single integer value per entity.
file_name | The file to read. |
tag_name | The tag for which to read values |
tag_values_out | Output: The list of tag values. |
subset_list | An array of tag name and value sets specifying the subset of the file to read. If multiple tags are specified, the sets that match all tags (intersection) should be read. |
subset_list_length | The length of the 'subset_list' array. |
Implements moab::ReaderIface.
Definition at line 105 of file ReadOBJ.cpp.
References MB_NOT_IMPLEMENTED.
|
private |
Definition at line 487 of file ReadOBJ.cpp.
References create_tri_faces(), ErrorCode, and MB_CHK_SET_ERR.
Referenced by load_file().
|
private |
Definition at line 275 of file ReadOBJ.cpp.
Referenced by load_file().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by create_new_object(), and ReadOBJ().
|
staticprivate |
Definition at line 167 of file ReadOBJ.hpp.
Referenced by load_file().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by ReadOBJ().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by create_new_object(), and ReadOBJ().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by ReadOBJ().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by create_new_group(), create_new_object(), and ReadOBJ().
|
private |
interface instance
Definition at line 148 of file ReadOBJ.hpp.
Referenced by create_new_face(), create_new_group(), create_new_object(), create_new_vertex(), create_tri_faces(), load_file(), ReadOBJ(), and ~ReadOBJ().
|
private |
Definition at line 150 of file ReadOBJ.hpp.
Referenced by create_new_object(), ReadOBJ(), and ~ReadOBJ().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by create_new_group(), create_new_object(), and ReadOBJ().
|
private |
Definition at line 152 of file ReadOBJ.hpp.
Referenced by create_new_object(), and ReadOBJ().
|
private |
Definition at line 145 of file ReadOBJ.hpp.
Referenced by ReadOBJ(), and ~ReadOBJ().