Commit fd294e2d authored by Johannes Lenzen's avatar Johannes Lenzen
Browse files

add qt6 support

parent eb3712e3
......@@ -176,8 +176,8 @@ void FileHeightFieldPNGPlugin::loadImageAsTriangleMesh(QImage& _image,TriMesh* _
for ( int i = _minX ; i < _maxX ; ++i ) {
for ( int j = _minY ; j < _maxY ; ++j ) {
const QColor currentColor = _image.pixel(i,j);
double value = std::max(currentColor.redF(),currentColor.blueF());
value = std::max(currentColor.greenF(),value);
float value = std::max((float)currentColor.redF(),(float)currentColor.blueF());
value = std::max((float)currentColor.greenF(),value);
TriMesh::VertexHandle vh = _mesh->add_vertex(TriMesh::Point(i,j,-value * _height));
_mesh->set_color(vh,TriMesh::Color(currentColor.redF(),currentColor.greenF(),currentColor.blueF(),1.0f));
}
......
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