Commit 0b9a9777 authored by Jan Möbius's avatar Jan Möbius
parents 25d0c892 3ae26e6a
Pipeline #6177 canceled with stage
in 3 minutes and 14 seconds
......@@ -76,7 +76,7 @@ public:
return vtexcoord_prop_[_h.idx()];
}
bool vertex_texcoords_available() { return vertex_texcoords_available_; }
bool vertex_texcoords_available() const { return vertex_texcoords_available_; }
void clear_vertex_texcoords();
......
......@@ -55,5 +55,6 @@ template <> const std::string typeName<bool>() { return "bool"; }
template <> const std::string typeName<float>() { return "float"; }
template <> const std::string typeName<double>() { return "double"; }
template <> const std::string typeName<std::string>() { return "string"; }
template <> const std::string typeName<std::map<HalfEdgeHandle, int> >(){ return "map_he_int"; }
} // Namespace OpenVolumeMesh
......@@ -72,6 +72,7 @@ template <> const std::string typeName<bool>();
template <> const std::string typeName<float>();
template <> const std::string typeName<double>();
template <> const std::string typeName<std::string>();
template <> const std::string typeName<std::map<HalfEdgeHandle, int> >();
/// Property classes for the different entity types
template<class T>
......
......@@ -256,9 +256,18 @@ private:
}
PropIterT it = _begin;
for(; it != _end; ++it) {
if((*it)->name() == _name && dynamic_cast<FullPropT*>(*it) != NULL) {
return true;
for(; it != _end; ++it)
{
if((*it)->name() == _name )
{
#if OVM_FORCE_STATIC_CAST
return true;
#else
if(dynamic_cast<FullPropT*>(*it) != NULL)
{
return true;
}
#endif
}
}
return false;
......
......@@ -326,6 +326,8 @@ void FileManager::readProperty(std::istream& _iff, MeshT& _mesh) const {
name = line;
extractQuotedText(name);
std::cerr << "OVM read property " << name << " of type " << prop_t << std::endl;
if(prop_t == typeName<int>()) generateGenericProperty<int, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<unsigned int>()) generateGenericProperty<unsigned int, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<short>()) generateGenericProperty<short, MeshT>(entity_t, name, _iff, _mesh);
......@@ -337,6 +339,7 @@ void FileManager::readProperty(std::istream& _iff, MeshT& _mesh) const {
else if(prop_t == typeName<float>()) generateGenericProperty<float, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<double>()) generateGenericProperty<double, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::string>()) generateGenericProperty<std::string, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<std::map<HalfEdgeHandle, int> >()) generateGenericProperty<std::map<HalfEdgeHandle, int>, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec2f>()) generateGenericProperty<Vec2f, MeshT>(entity_t, name, _iff, _mesh);
else if(prop_t == typeName<Vec2d>()) generateGenericProperty<Vec2d, MeshT>(entity_t, name, _iff, _mesh);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment