Made SceneNodes non-movable

Fixed SceneNodes copy constructor not parenting the right object


Former-commit-id: 21a08e3bb0931af426d97399dab86dda9acdf172
This commit is contained in:
Lynix
2015-01-17 00:15:01 +01:00
parent 6d3228477f
commit fdb722ef14
7 changed files with 25 additions and 58 deletions

View File

@@ -35,20 +35,14 @@ m_skinCount(1)
NzModel::NzModel(const NzModel& model) :
NzSceneNode(model),
m_materials(model.m_materials),
m_mesh(model.m_mesh),
m_boundingVolume(model.m_boundingVolume),
m_boundingVolumeUpdated(model.m_boundingVolumeUpdated),
m_matCount(model.m_matCount),
m_skin(model.m_skin),
m_skinCount(model.m_skinCount)
{
if (model.m_mesh)
{
// Nous n'avons des matériaux que si nous avons un mesh
m_mesh = model.m_mesh;
m_materials = model.m_materials;
}
SetParent(model);
SetParent(model.GetParent());
}
NzModel::~NzModel()
@@ -420,24 +414,6 @@ NzModel& NzModel::operator=(const NzModel& node)
return *this;
}
NzModel& NzModel::operator=(NzModel&& node)
{
NzSceneNode::operator=(node);
// Ressources
m_mesh = std::move(node.m_mesh);
m_materials = std::move(node.m_materials);
// Paramètres
m_boundingVolume = node.m_boundingVolume;
m_boundingVolumeUpdated = node.m_boundingVolumeUpdated;
m_matCount = node.m_matCount;
m_skin = node.m_skin;
m_skinCount = node.m_skinCount;
return *this;
}
void NzModel::InvalidateNode()
{
NzSceneNode::InvalidateNode();