replacing diffuse to get_color method

This commit is contained in:
Cristian Ritter
2024-08-20 11:44:20 -03:00
parent cd3df94a4b
commit d714eca4ee
4 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -354,8 +354,8 @@ protected:
std::vector<boost::optional<std::array<float, 4> > > diffuse_color_array;
for (auto it = geom->geometry().materials().begin(); it != geom->geometry().materials().end(); ++it) {
const auto& mat = **it;
if (mat.diffuse) {
const auto& color = mat.diffuse.ccomponents();
if (mat.get_color()) {
const auto& color = mat.get_color().ccomponents();
diffuse_color_array.push_back(std::array<float, 4>{
static_cast<float>(color(0)),
static_cast<float>(color(1)),