mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
- added MeshModel copy constructor
This commit is contained in:
parent
bfc4c38bbb
commit
f2952793ee
@ -370,6 +370,21 @@ MeshModel::MeshModel(MeshDocument *_parent, QString fullFileName, QString labelN
|
||||
if(!labelName.isEmpty()) this->_label=labelName;
|
||||
}
|
||||
|
||||
MeshModel::MeshModel(MeshModel* cp)
|
||||
{
|
||||
if (cp == NULL)
|
||||
return;
|
||||
parent = cp->parent;
|
||||
if (parent != NULL)
|
||||
_id = parent->newMeshId();
|
||||
cm.Tr = cp->cm.Tr;
|
||||
cm.sfn = cp->cm.sfn;
|
||||
cm.svn = cp->cm.svn;
|
||||
visible = cp->visible;
|
||||
updateDataMask(cp->currentDataMask);
|
||||
vcg::tri::Append<CMeshO, CMeshO>::MeshCopy(cm, cp->cm);
|
||||
}
|
||||
|
||||
QString MeshModel::relativePathName() const
|
||||
{
|
||||
QDir documentDir (documentPathName());
|
||||
|
||||
@ -123,8 +123,9 @@ public:
|
||||
};
|
||||
|
||||
MeshModel(MeshDocument *parent, QString fullFileName, QString labelName);
|
||||
|
||||
MeshDocument *parent;
|
||||
MeshModel(MeshModel* cp);
|
||||
|
||||
MeshDocument *parent;
|
||||
|
||||
CMeshO cm;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user