Use 0-based indices for materials consistently

This commit is contained in:
Paul Romano 2019-02-25 08:54:19 -06:00
parent 5c6633c2c3
commit 4a89075890
17 changed files with 82 additions and 107 deletions

View file

@ -676,8 +676,8 @@ void position_rgb(Particle p, Plot pl, RGBColor& rgb, int& id)
rgb = WHITE;
id = -1;
} else {
rgb = pl.colors_[p.material - 1];
id = model::materials[p.material - 1]->id_;
rgb = pl.colors_[p.material];
id = model::materials[p.material]->id_;
}
} else if (PlotColorBy::cells == pl.color_by_) {
// Assign color based on cell