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

VMO: offer recreateProperties for use with mesh assignment

parent 9e4cb616
Branches ovm-v3-test
No related tags found
No related merge requests found
......@@ -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