Skip to content
Snippets Groups Projects
Commit fd294e2d authored by Johannes Lenzen's avatar Johannes Lenzen
Browse files

add qt6 support

parent eb3712e3
No related branches found
No related tags found
1 merge request!1Qt6 support
......@@ -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));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment