struct for storing cell data attached to Wavefront OBJ polygonal mesh More...

#include <IOWavefrontOBJ.hpp>

Collaboration diagram for mimmo::WavefrontOBJData:

Public Member Functions

 WavefrontOBJData ()
 
virtual ~WavefrontOBJData ()
 
void autoCompleteCellFields ()
 
void swap (WavefrontOBJData &x) noexcept
 
void syncListsOnData ()
 

Public Attributes

MimmoPiercedVector< std::string > cellgroups
 
std::unordered_map< std::string, long > cellgroupsList
 
std::unordered_map< long, std::string > inv_cellgroupsList
 
std::unordered_map< long, std::string > inv_materialsList
 
std::unordered_map< long, std::string > inv_smoothidsList
 
std::string materialfile
 
MimmoPiercedVector< std::string > materials
 
std::unordered_map< std::string, long > materialsList
 
MimmoSharedPointer< MimmoObjectnormals
 
MimmoSharedPointer< MimmoObjectrefGeometry
 
MimmoPiercedVector< long > smoothids
 
std::unordered_map< std::string, long > smoothidsList
 
MimmoSharedPointer< MimmoObjecttextures
 

Protected Member Functions

void dump (std::ostream &out)
 
void restore (std::istream &out)
 

Friends

class IOWavefrontOBJ
 

Detailed Description

struct for storing cell data attached to Wavefront OBJ polygonal mesh

BEWARE MimmoPiercedVector for cellgroups, materials and smoothids must be referred to Mesh linked in refGeometry. Textures and Normals are treated as indipendent MimmoObject w.r.t. Mesh MimmoObject( each one has its own set of nodes, and local connectivities), but they must always share the same number and cell-id labels for element/simplex cross referencing between the three MimmoObjects.

In parallel the data are read/written by each processor.

Definition at line 45 of file IOWavefrontOBJ.hpp.

Constructor & Destructor Documentation

◆ WavefrontOBJData()

mimmo::WavefrontOBJData::WavefrontOBJData ( )

Constructor

Definition at line 38 of file IOWavefrontOBJ.cpp.

◆ ~WavefrontOBJData()

virtual mimmo::WavefrontOBJData::~WavefrontOBJData ( )
inlinevirtual

destructor

Definition at line 74 of file IOWavefrontOBJ.hpp.

Member Function Documentation

◆ autoCompleteCellFields()

void mimmo::WavefrontOBJData::autoCompleteCellFields ( )

autocomplete cell field information (material, smoothids, and cellgroups)) with default values ('', 0, '' respectively).

Definition at line 137 of file IOWavefrontOBJ.cpp.

◆ dump()

void mimmo::WavefrontOBJData::dump ( std::ostream &  out)
protected

Dump class contents to an output stream in binary format

Parameters
[in]outbinary output stream

Definition at line 148 of file IOWavefrontOBJ.cpp.

◆ restore()

void mimmo::WavefrontOBJData::restore ( std::istream &  in)
protected

Restore class contents from an input stream in binary format

Parameters
[in]inbinary input stream

Definition at line 213 of file IOWavefrontOBJ.cpp.

◆ swap()

void mimmo::WavefrontOBJData::swap ( WavefrontOBJData x)
noexcept

Swap operator. Swap content with a twin class.

Parameters
[in]xother WavefrontOBJData OBJect.

Definition at line 53 of file IOWavefrontOBJ.cpp.

◆ syncListsOnData()

void mimmo::WavefrontOBJData::syncListsOnData ( )

Synchronize the lists with the inner data currently present in the class. Following convention is used:

  • id = 0 of materials is string '' (ie no material is expressed for the cell)
  • id = 0 of smooth ids is 'off' key for smoothing (no smoothing is applied to the cell)

Definition at line 76 of file IOWavefrontOBJ.cpp.

Member Data Documentation

◆ cellgroups

MimmoPiercedVector<std::string> mimmo::WavefrontOBJData::cellgroups

label identifying cell group label which a cell can possibly belong to

Definition at line 54 of file IOWavefrontOBJ.hpp.

◆ cellgroupsList

std::unordered_map<std::string, long> mimmo::WavefrontOBJData::cellgroupsList

list of all cell group labels inside the class, arguments marks long id

Definition at line 62 of file IOWavefrontOBJ.hpp.

◆ inv_cellgroupsList

std::unordered_map<long, std::string> mimmo::WavefrontOBJData::inv_cellgroupsList

inverse of cellgroupslist

Definition at line 66 of file IOWavefrontOBJ.hpp.

◆ inv_materialsList

std::unordered_map<long, std::string> mimmo::WavefrontOBJData::inv_materialsList

inverse of materialList

Definition at line 64 of file IOWavefrontOBJ.hpp.

◆ inv_smoothidsList

std::unordered_map<long, std::string> mimmo::WavefrontOBJData::inv_smoothidsList

inverse of smoothidslist

Definition at line 65 of file IOWavefrontOBJ.hpp.

◆ materialfile

std::string mimmo::WavefrontOBJData::materialfile

path to materials file associated to the obj file

Definition at line 69 of file IOWavefrontOBJ.hpp.

◆ materials

MimmoPiercedVector<std::string> mimmo::WavefrontOBJData::materials

label identifying material group which a cell can possibly belong to

Definition at line 52 of file IOWavefrontOBJ.hpp.

◆ materialsList

std::unordered_map<std::string, long> mimmo::WavefrontOBJData::materialsList

list of all materials inside the class, argument marks long id

Definition at line 60 of file IOWavefrontOBJ.hpp.

◆ normals

MimmoSharedPointer<MimmoObject> mimmo::WavefrontOBJData::normals

MimmoObject container for vnormals properties

Definition at line 57 of file IOWavefrontOBJ.hpp.

◆ refGeometry

MimmoSharedPointer<MimmoObject> mimmo::WavefrontOBJData::refGeometry

reference geometry which the class belongs to

Definition at line 70 of file IOWavefrontOBJ.hpp.

◆ smoothids

MimmoPiercedVector<long> mimmo::WavefrontOBJData::smoothids

marker identifying smooth group which a cell can possibly belong to

Definition at line 53 of file IOWavefrontOBJ.hpp.

◆ smoothidsList

std::unordered_map<std::string, long> mimmo::WavefrontOBJData::smoothidsList

list of all smoothing group ids inside the class, arguments marks long id

Definition at line 61 of file IOWavefrontOBJ.hpp.

◆ textures

MimmoSharedPointer<MimmoObject> mimmo::WavefrontOBJData::textures

MimmoObject container for texture properties

Definition at line 56 of file IOWavefrontOBJ.hpp.


The documentation for this class was generated from the following files: