Skip to content

Sliders have to change the mesh #5

@patrikhuber

Description

@patrikhuber

The displayed model cannot be changed yet by adjusting the individual sliders.

We should probably do that inside the coefficients sliders drawing code. There, we know that we've got valid coefficients, if that code path is executed.
We can map a shape or colour instance to igl like this:

Eigen::Map<Eigen::MatrixXf> shape_reshaped(shape.data(), 3, num_vertices);
// Take 3 at a piece, then transpose below. Works.
viewer.data.set_vertices(shape_reshaped.transpose().cast<double>());

Note: This code will actually fail for gray-level models.

Also, maybe this can be improved based on ocornut/imgui#1716.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions