Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,9 @@ void VisualModelImpl::init()
d_translation.setValue(Vec3Real());
d_rotation.setValue(Vec3Real());
d_scale.setValue(Vec3Real(1, 1, 1));
}

m_savedMaterial = d_material.getValue();
}

void VisualModelImpl::initPositionFromVertices()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ class SOFA_COMPONENT_VISUAL_API VisualModelImpl : public core::visual::VisualMod
d_edges.setValue(*e);
}

const sofa::type::Material& getSavedMaterial() {return m_savedMaterial;}

virtual void computePositions();
virtual void computeMesh();
virtual void computeNormals();
Expand Down Expand Up @@ -399,6 +401,9 @@ class SOFA_COMPONENT_VISUAL_API VisualModelImpl : public core::visual::VisualMod

/// Internal buffer similar to @sa m_dirtyTriangles but to be used by topolgy Data @sa d_quads callback when points are removed.
std::set< sofa::core::topology::BaseMeshTopology::QuadID> m_dirtyQuads;

/// Store the material information, to restore it after rendering with a specific material for selection (GUI related).
sofa::type::Material m_savedMaterial;
};


Expand Down
Loading