tumcms / Open-Infra-Platform

This is the official repository of the open-source Open Infra Platform software (as of April 2020).
Other
48 stars 22 forks source link

Implement color reader for OFF Files #484

Closed Elvira2227 closed 2 years ago

Elvira2227 commented 2 years ago

Fixes #354

Added new function readColorsFromFace to read colors from OFF Files.

In the attachment there are some screenshots to represent colors read from the cube.off I am not sure if that representation is correct. I am confused by the blur at the edges. Maybe this is a feature of our UI?

image image

Elvira2227 commented 2 years ago

The code still supports 3 colors: red, green and blue. I would suggest adding a few more exceptions to the code to avoid reading errors.

jschlenger commented 2 years ago

I haven't found anything that would prevent colors to be represented accordingly. I could imagine that the issue is that the color vector is expecting values between 0.0f and 1.0f and we are providing it with values between 0 and 255 which could lead to the result that everything that is not 0 is interpreted as 1.0f. Maybe take a look at that and see if color values between 0.0 and 1.0 give the results that we need.

Elvira2227 commented 2 years ago

At the last commit bbb7fb7 I added all suggestions and it finally works with color representation (i mean all of rgb color, see some screenshots) image image

Elvira2227 commented 2 years ago

In the last commit 368de21 was added correctly implementation of black color and defaul TUM-blue color. See screen shots image

UPDATE: In b9f0a2f corrected conditions of if statement. It works!