50 #include "PropertyModelFactory.hh" 52 #include "MultiObjectPropertyModel.hh" 53 #include "OpenMesh/OMPropertyModel.hh" 55 #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT 56 #include "OpenVolumeMesh/OVMPropertyModel.hh" 59 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT 62 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT 65 #ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT 89 if (objectID == -13 || objectID == -14 || objectID == -15)
91 if (propertyModelMap.find(objectID) == propertyModelMap.end())
93 propertyModelMap[objectID] = 0;
96 if (propertyModelMap[objectID])
98 delete propertyModelMap[objectID];
99 propertyModelMap[objectID] = 0;
114 return propertyModelMap[objectID];
117 PropertyModelMap::iterator it = propertyModelMap.find(objectID);
118 if (it != propertyModelMap.end())
141 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT 145 propertyModel =
new OVMPropertyModel<PolyhedralMesh>(mesh, objectID);
148 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT 152 propertyModel =
new OVMPropertyModel<HexahedralMesh>(mesh, objectID);
155 #ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT 156 else if ( object->dataType(DATA_TETRAHEDRAL_MESH) )
158 TetrahedralMesh* mesh = PluginFunctions::tetrahedralMesh(
object);
159 propertyModel =
new OVMPropertyModel<TetrahedralMesh>(mesh, objectID);
167 propertyModelMap.insert(std::pair<int, PropertyModel*>(objectID, propertyModel));
168 return propertyModel;
173 if (propertyModelMap.find(objectID) != propertyModelMap.end())
176 propertyModelMap.erase(objectID);
PropertyModel * getModel(int objectID)
Returns the PropertyModel.
bool getObject(int _identifier, BSplineCurveObject *&_object)
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
const QStringList SOURCE_OBJECTS("source")
Iterable object range.
const QStringList TARGET_OBJECTS("target")
Iterable object range.
#define DATA_POLYHEDRAL_MESH
const QStringList ALL_OBJECTS
Iterable object range.
#define DATA_HEXAHEDRAL_MESH
PolyhedralMesh * polyhedralMesh(BaseObjectData *_object)
Get an PolyhedralMesh from an object.
void deleteModel(int objectID)
Deletes the PropertyModel.
#define DATA_TRIANGLE_MESH
HexahedralMesh * hexahedralMesh(BaseObjectData *_object)
Get an HexahedralMesh from an object.
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.