Add simple mesh viewer
This commit is contained in:
parent
fcd90b5db4
commit
8a41337e2d
19 changed files with 275 additions and 2 deletions
|
@ -121,10 +121,16 @@ void OpenGlMeshPainter::paint(SceneModel* model, DrawingContext* context)
|
|||
else
|
||||
{
|
||||
indices = dynamic_cast<TriMesh*>(model->getMesh())->getFaceNodeIds();
|
||||
|
||||
}
|
||||
|
||||
auto model_color = model->getColor().getAsVectorDouble();
|
||||
std::vector<float> color = {float(model_color[0]), float(model_color[1]), float(model_color[2]), float(model_color[3])};
|
||||
|
||||
paint(vertices, indices, color, line_mesh);
|
||||
|
||||
if (model->getShowOutline())
|
||||
{
|
||||
auto edge_indices = dynamic_cast<TriMesh*>(model->getMesh())->getEdgeNodeIds();
|
||||
paint(vertices, edge_indices, {0, 0, 0, 1}, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue