Skip to content
Snippets Groups Projects
Commit 51f2e3d3 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

VMO: offer recreateProperties for use with mesh assignment

parent 02f9b4b1
No related branches found
No related tags found
1 merge request!33Ovm v3.3
......@@ -115,6 +115,11 @@ public:
MeshT* mesh();
const MeshT* mesh() const;
/// re-create mesh attribute objects. This us useful after
/// using mesh assignment to use the newly assigned properties instead
/// of the old stale ones.
void recreateAttributes();
/** return a full copy of this object ( All scenegraph nodes will be created )
* but the object will not be a part of the object tree.
*/
......
......@@ -98,6 +98,16 @@ VolumeMeshObject<MeshT>::VolumeMeshObject(DataType _typeId) :
init();
}
template<class MeshT>
void VolumeMeshObject<MeshT>::recreateAttributes()
{
statusAttrib_ = StatusAttrib(*mesh_);
colorAttrib_ = ColorAttrib(*mesh_);
normalAttrib_ = NormalAttrib(*mesh_);
texcoordAttrib_ = TexCoordAttrib(*mesh_);
}
template<class MeshT>
VolumeMeshObject<MeshT>::~VolumeMeshObject() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment