Skip to content
Snippets Groups Projects
Commit a746e303 authored by Andrew Wilson's avatar Andrew Wilson :elephant:
Browse files

Merge branch 'IOAndTextureFix' into 'master'

IO and Texture Fix

See merge request iMSTK/iMSTK!822
parents b336bd68 dd981c74
No related branches found
No related tags found
No related merge requests found
......@@ -174,7 +174,15 @@ VTKMeshIO::write(const std::shared_ptr<PointSet> imstkMesh, const std::string& f
}
case MeshFileType::VTK:
if (auto tetMesh = std::dynamic_pointer_cast<TetrahedralMesh>(vMesh))
if (auto lineMesh = std::dynamic_pointer_cast<LineMesh>(vMesh))
{
return VTKMeshIO::writeVtkPolyData<vtkGenericDataObjectWriter>(lineMesh, filePath);
}
else if (auto surfMesh = std::dynamic_pointer_cast<SurfaceMesh>(vMesh))
{
return VTKMeshIO::writeVtkPolyData<vtkGenericDataObjectWriter>(surfMesh, filePath);
}
else if (auto tetMesh = std::dynamic_pointer_cast<TetrahedralMesh>(vMesh))
{
return VTKMeshIO::writeVtkUnstructuredGrid<vtkGenericDataObjectWriter>(tetMesh, filePath);
}
......
......@@ -609,9 +609,9 @@ VTKSurfaceMeshRenderDelegate::initializeTextures()
}
}
}
else
else if (texture->getType() == Texture::Type::Diffuse)
{
actor->GetProperty()->SetTexture(textureDelegate->getTextureName().c_str(), currentTexture);
actor->SetTexture(currentTexture);
}
currentUnit++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment