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

Merge branch 'qt_6' into 'master'

Qt6 support

See merge request !1
parents eb3712e3 fd294e2d
......@@ -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));
}
......
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