Commit 8bee8630 authored by Jan Möbius's avatar Jan Möbius
Browse files

Import color from Height map as per vertex colors

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 599e42b2
......@@ -170,7 +170,8 @@ void FileHeightFieldPNGPlugin::loadImageAsTriangleMesh(QImage& _image,TriMesh* _
const QColor currentColor = _image.pixel(i,j);
double value = std::max(currentColor.redF(),currentColor.blueF());
value = std::max(currentColor.greenF(),value);
_mesh->add_vertex(TriMesh::Point(i,j,-value * _height));
TriMesh::VertexHandle vh = _mesh->add_vertex(TriMesh::Point(i,j,-value * _height));
Supports Markdown
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