MEPP2 Project
|
Enumerations | |
enum | ply_property { VERTEX_PROPERTY, EDGE_PROPERTY, FACE_PROPERTY } |
Functions | |
FbxString | dbg_get_attr_type_name (FbxNodeAttribute::EType type) |
void | dbg_print_attribute (FbxNodeAttribute *pAttribute) |
void | dbg_print_node (FbxNode *pNode) |
void | dbg_display_infos (const FbxScene &scene) |
template<typename coord_type , typename coordN_type , typename coordT_type , typename coordC_type , typename index_type , typename material_type > | |
void | read_fbx_file (const std::string &filePath, std::vector< std::vector< coord_type > > &points_coords, std::vector< std::vector< coordN_type > > &normals_coords, std::vector< std::vector< coordT_type > > &texture_coords, std::vector< std::vector< coordC_type > > &, std::vector< std::vector< index_type > > &face_indices, std::vector< std::vector< index_type > > &texture_face_indices, std::vector< std::vector< index_type > > &normal_face_indices, std::vector< material_type > &materials, std::vector< index_type > &face_material) |
Read the FBX file and load its data into given parameters. More... | |
template<typename IndexType > | |
IndexType | dimensions (IndexType type) |
template<typename IndexType > | |
std::vector< IndexType > | get_index (char *buffer, IndexType d) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
bool | init_vectors (const std::string &file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &line_indices, std::vector< std::vector< CoordCType > > &lines_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, IndexType &dim) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
bool | read_gmsh_file (const std::string &file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &line_indices, std::vector< std::vector< CoordCType > > &lines_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, std::vector< std::vector< std::vector< double > > > &field_attributes, std::vector< std::string > &field_names) |
template<typename IndexType > | |
IndexType | get_type (const IndexType size, const IndexType dim) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
bool | write_gmsh_file (const std::string &file_path, const std::vector< std::vector< CoordType > > &points_coords, const std::vector< std::vector< CoordNType > > &normals_coords, const std::vector< std::vector< CoordCType > > &vertex_color_coords, const std::vector< std::vector< IndexType > > &line_indices, const std::vector< std::vector< CoordCType > > &lines_color_coords, const std::vector< std::vector< IndexType > > &face_indices, const std::vector< std::vector< CoordCType > > &face_color_coords, const std::vector< std::vector< std::vector< double > > > &field_attributes, const std::vector< std::string > &field_names) |
template<typename MaterialType > | |
void | dbg_display_materials (const std::vector< MaterialType > &materials) |
template<typename MaterialType > | |
void | read_mtl_file (const std::string &mtl_file_name, std::vector< MaterialType > &materials) |
template<typename CoordType , typename CoordNType , typename CoordTType , typename CoordCType , typename IndexType , typename MaterialType > | |
void | read_obj_file (const std::string &file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< IndexType > > &texture_face_indices, std::vector< std::vector< IndexType > > &normal_face_indices, std::vector< MaterialType > &materials, std::vector< IndexType > &face_material) |
template<typename MaterialType > | |
void | write_mtl_file (const std::string &mtl_file_name, std::vector< MaterialType > &materials) |
template<typename CoordType , typename CoordNType , typename CoordTType , typename CoordCType , typename IndexType , typename MaterialType > | |
void | write_obj_file (const std::string &file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< IndexType > > &texture_face_indices, std::vector< std::vector< IndexType > > &normal_face_indices, std::vector< MaterialType > &materials, std::vector< IndexType > &face_material) |
template<typename CoordType , typename CoordNType , typename CoordTType , typename CoordCType , typename IndexType > | |
void | read_off_file (std::string file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords) |
template<typename CoordType , typename CoordNType , typename CoordTType , typename CoordCType , typename IndexType > | |
void | write_off_file (std::string file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, unsigned long nb_total_edges=0) |
template<typename CoordType , typename CoordNType , typename CoordTType , typename CoordCType , typename IndexType > | |
void | read_ply_file (std::string file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordTType > > &texture_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< IndexType > > &texture_face_indices) |
std::string | get_line_containing_dataset (std::string file_path) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
void | read_vtk_poly_data (const vtkSmartPointer< vtkPolyData > &poly_data, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &line_indices, std::vector< std::vector< CoordCType > > &lines_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, std::vector< std::vector< std::vector< double > > > &field_attributes, std::vector< std::string > &field_names) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
void | read_vtk_unstructured_grid (const vtkSmartPointer< vtkUnstructuredGrid > &unstructured_grid, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &line_indices, std::vector< std::vector< CoordCType > > &lines_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, std::vector< std::vector< std::vector< double > > > &field_attributes, std::vector< std::string > &field_names) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
void | read_vtk_or_vtp_or_vtu_file (std::string file_path, std::vector< std::vector< CoordType > > &points_coords, std::vector< std::vector< CoordNType > > &normals_coords, std::vector< std::vector< CoordCType > > &vertex_color_coords, std::vector< std::vector< IndexType > > &line_indices, std::vector< std::vector< CoordCType > > &lines_color_coords, std::vector< std::vector< IndexType > > &face_indices, std::vector< std::vector< CoordCType > > &face_color_coords, std::vector< std::vector< std::vector< double > > > &field_attributes, std::vector< std::string > &field_names, bool if_unstructured_grid_then_take_surface=false) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
void | load_vtk_poly_data (const std::vector< std::vector< CoordType > > &points_coords, const std::vector< std::vector< CoordNType > > &normals_coords, const std::vector< std::vector< CoordCType > > &vertex_color_coords, const std::vector< std::vector< IndexType > > &line_indices, const std::vector< std::vector< CoordCType > > &lines_color_coords, const std::vector< std::vector< IndexType > > &face_indices, const std::vector< std::vector< CoordCType > > &face_color_coords, const std::vector< std::vector< std::vector< double > > > &field_attributes, const std::vector< std::string > &field_names, vtkSmartPointer< vtkPolyData > &poly_data) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
void | load_vtk_unstructured_grid (const std::vector< std::vector< CoordType > > &points_coords, const std::vector< std::vector< CoordNType > > &normals_coords, const std::vector< std::vector< CoordCType > > &vertex_color_coords, const std::vector< std::vector< IndexType > > &line_indices, const std::vector< std::vector< CoordCType > > &lines_color_coords, const std::vector< std::vector< IndexType > > &face_indices, const std::vector< std::vector< CoordCType > > &face_color_coords, const std::vector< std::vector< std::vector< double > > > &field_attributes, const std::vector< std::string > &field_names, vtkSmartPointer< vtkUnstructuredGrid > &unstructured_grid) |
template<typename CoordType , typename CoordNType , typename CoordCType , typename IndexType > | |
void | write_vtk_or_vtp_or_vtu_file (std::string file_path, const std::vector< std::vector< CoordType > > &points_coords, const std::vector< std::vector< CoordNType > > &normals_coords, const std::vector< std::vector< CoordCType > > &vertex_color_coords, const std::vector< std::vector< IndexType > > &line_indices, const std::vector< std::vector< CoordCType > > &lines_color_coords, const std::vector< std::vector< IndexType > > &face_indices, const std::vector< std::vector< CoordCType > > &face_color_coords, const std::vector< std::vector< std::vector< double > > > &field_attributes, const std::vector< std::string > &field_names) |
Enumerator | |
---|---|
VERTEX_PROPERTY | |
EDGE_PROPERTY | |
FACE_PROPERTY |
Definition at line 30 of file PlyFileReader.h.
|
inline |
void FEVV::IO::dbg_display_materials | ( | const std::vector< MaterialType > & | materials | ) |
Print information about the materials.
Definition at line 45 of file ObjFileReader.h.
|
inline |
Return a string-based representation based on the attribute type.
Definition at line 45 of file FbxFileReader.h.
|
inline |
Print an attribute.
Definition at line 98 of file FbxFileReader.h.
|
inline |
Print a node, its attributes, and all its children recursively.
Definition at line 116 of file FbxFileReader.h.
|
inline |
std::vector<IndexType> FEVV::IO::get_index | ( | char * | buffer, |
IndexType | d | ||
) |
|
inline |
|
inline |
bool FEVV::IO::init_vectors | ( | const std::string & | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | line_indices, | ||
std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
IndexType & | dim | ||
) |
Definition at line 112 of file MshFileReader.h.
void FEVV::IO::load_vtk_poly_data | ( | const std::vector< std::vector< CoordType > > & | points_coords, |
const std::vector< std::vector< CoordNType > > & | normals_coords, | ||
const std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
const std::vector< std::vector< IndexType > > & | line_indices, | ||
const std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
const std::vector< std::vector< IndexType > > & | face_indices, | ||
const std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
const std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
const std::vector< std::string > & | field_names, | ||
vtkSmartPointer< vtkPolyData > & | poly_data | ||
) |
lines_color_coords | edges (can also be used to decribe a volume element [old compatibility with Xavier Faure work]) |
face_color_coords | polygonal faces made of vertex indices |
Definition at line 51 of file VtkFileWriter.h.
void FEVV::IO::load_vtk_unstructured_grid | ( | const std::vector< std::vector< CoordType > > & | points_coords, |
const std::vector< std::vector< CoordNType > > & | normals_coords, | ||
const std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
const std::vector< std::vector< IndexType > > & | line_indices, | ||
const std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
const std::vector< std::vector< IndexType > > & | face_indices, | ||
const std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
const std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
const std::vector< std::string > & | field_names, | ||
vtkSmartPointer< vtkUnstructuredGrid > & | unstructured_grid | ||
) |
lines_color_coords | edges (can also be used to decribe a volume element [old compatibility with Xavier Faure work]) |
face_color_coords | polygonal facets made of vertex indices |
Definition at line 376 of file VtkFileWriter.h.
void FEVV::IO::read_fbx_file | ( | const std::string & | filePath, |
std::vector< std::vector< coord_type > > & | points_coords, | ||
std::vector< std::vector< coordN_type > > & | normals_coords, | ||
std::vector< std::vector< coordT_type > > & | texture_coords, | ||
std::vector< std::vector< coordC_type > > & | , | ||
std::vector< std::vector< index_type > > & | face_indices, | ||
std::vector< std::vector< index_type > > & | texture_face_indices, | ||
std::vector< std::vector< index_type > > & | normal_face_indices, | ||
std::vector< material_type > & | materials, | ||
std::vector< index_type > & | face_material | ||
) |
Read the FBX file and load its data into given parameters.
filePath | path to the FBX file. |
points_coords | list of positions' data. |
normals_coords | list of normals' data. |
texture_coords | list of texture coordinates' data. |
vertex_color_coords | list of vertex colors' data. |
face_indices | list of face indices. |
texture_face_indices | list of texture coordinates' indices. |
normal_face_indices | list of normals' indices. |
materials | list of all the materials the file contains. |
face_material | list of material index per face. |
Definition at line 176 of file FbxFileReader.h.
bool FEVV::IO::read_gmsh_file | ( | const std::string & | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | line_indices, | ||
std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
std::vector< std::string > & | field_names | ||
) |
Read gmsh (.msh) file and store mesh data in an intermediate vector representation.
Definition at line 427 of file MshFileReader.h.
void FEVV::IO::read_mtl_file | ( | const std::string & | mtl_file_name, |
std::vector< MaterialType > & | materials | ||
) |
Read the provided MTL file and populate the materials datastructure.
Definition at line 71 of file ObjFileReader.h.
void FEVV::IO::read_obj_file | ( | const std::string & | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordTType > > & | texture_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< IndexType > > & | texture_face_indices, | ||
std::vector< std::vector< IndexType > > & | normal_face_indices, | ||
std::vector< MaterialType > & | materials, | ||
std::vector< IndexType > & | face_material | ||
) |
Read OBJ file and store mesh data in an intermediate vector representation.
Definition at line 324 of file ObjFileReader.h.
void FEVV::IO::read_off_file | ( | std::string | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordTType > > & | texture_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords | ||
) |
Read _OFF file and store mesh data in an intermediate vector representation.
Definition at line 40 of file OffFileReader.h.
void FEVV::IO::read_ply_file | ( | std::string | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordTType > > & | texture_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< IndexType > > & | texture_face_indices | ||
) |
Read PLY file and store mesh data in an intermediate vector representation.
Definition at line 41 of file PlyFileReader.h.
void FEVV::IO::read_vtk_or_vtp_or_vtu_file | ( | std::string | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | line_indices, | ||
std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
std::vector< std::string > & | field_names, | ||
bool | if_unstructured_grid_then_take_surface = false |
||
) |
vertex_color_coords | should have either 0 or points_coords.size() at the end |
lines_color_coords | edges (can also be used to decribe a volume element) |
face_color_coords | polygonal facets made of vertex indices |
Definition at line 929 of file VtkFileReader.h.
void FEVV::IO::read_vtk_poly_data | ( | const vtkSmartPointer< vtkPolyData > & | poly_data, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | line_indices, | ||
std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
std::vector< std::string > & | field_names | ||
) |
vertex_color_coords | should have either 0 or points_coords.size() at the end |
lines_color_coords | edges (can also be used to decribe a volume element) |
face_color_coords | polygonal face made of vertex indices |
Definition at line 88 of file VtkFileReader.h.
void FEVV::IO::read_vtk_unstructured_grid | ( | const vtkSmartPointer< vtkUnstructuredGrid > & | unstructured_grid, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | line_indices, | ||
std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
std::vector< std::string > & | field_names | ||
) |
vertex_color_coords | should have either 0 or points_coords.size() at the end |
lines_color_coords | edges (can also be used to decribe a volume element) |
face_color_coords | polygonal facets made of vertex indices |
Definition at line 469 of file VtkFileReader.h.
bool FEVV::IO::write_gmsh_file | ( | const std::string & | file_path, |
const std::vector< std::vector< CoordType > > & | points_coords, | ||
const std::vector< std::vector< CoordNType > > & | normals_coords, | ||
const std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
const std::vector< std::vector< IndexType > > & | line_indices, | ||
const std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
const std::vector< std::vector< IndexType > > & | face_indices, | ||
const std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
const std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
const std::vector< std::string > & | field_names | ||
) |
Write mesh data to gmsh (.msh) file.
Definition at line 51 of file MshFileWriter.h.
void FEVV::IO::write_mtl_file | ( | const std::string & | mtl_file_name, |
std::vector< MaterialType > & | materials | ||
) |
Write materials to MTL file.
Definition at line 36 of file ObjFileWriter.h.
void FEVV::IO::write_obj_file | ( | const std::string & | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordTType > > & | texture_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< IndexType > > & | texture_face_indices, | ||
std::vector< std::vector< IndexType > > & | normal_face_indices, | ||
std::vector< MaterialType > & | materials, | ||
std::vector< IndexType > & | face_material | ||
) |
Write mesh data to OBJ file.
Definition at line 196 of file ObjFileWriter.h.
void FEVV::IO::write_off_file | ( | std::string | file_path, |
std::vector< std::vector< CoordType > > & | points_coords, | ||
std::vector< std::vector< CoordNType > > & | normals_coords, | ||
std::vector< std::vector< CoordTType > > & | texture_coords, | ||
std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
std::vector< std::vector< IndexType > > & | face_indices, | ||
std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
unsigned long | nb_total_edges = 0 |
||
) |
Write mesh data to OFF file.
Definition at line 50 of file OffFileWriter.h.
void FEVV::IO::write_vtk_or_vtp_or_vtu_file | ( | std::string | file_path, |
const std::vector< std::vector< CoordType > > & | points_coords, | ||
const std::vector< std::vector< CoordNType > > & | normals_coords, | ||
const std::vector< std::vector< CoordCType > > & | vertex_color_coords, | ||
const std::vector< std::vector< IndexType > > & | line_indices, | ||
const std::vector< std::vector< CoordCType > > & | lines_color_coords, | ||
const std::vector< std::vector< IndexType > > & | face_indices, | ||
const std::vector< std::vector< CoordCType > > & | face_color_coords, | ||
const std::vector< std::vector< std::vector< double > > > & | field_attributes, | ||
const std::vector< std::string > & | field_names | ||
) |
lines_color_coords | edges (can also be used to decribe a volume element [old compatibility with Xavier Faure work]) |
face_color_coords | polygonal facets made of vertex indices |
Definition at line 727 of file VtkFileWriter.h.