mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
add parent property to deffered objects
This commit is contained in:
@@ -319,8 +319,8 @@ void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationEleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
deferreds.push_back(
|
deferreds.push_back(
|
||||||
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||||
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs())
|
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs(), "")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationEleme
|
|||||||
|
|
||||||
deferreds.push_back(
|
deferreds.push_back(
|
||||||
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||||
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs())
|
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs(), parent->name())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,10 +132,11 @@ private:
|
|||||||
std::vector<IfcGeom::Material> materials;
|
std::vector<IfcGeom::Material> materials;
|
||||||
std::vector<std::string> material_references;
|
std::vector<std::string> material_references;
|
||||||
std::vector<real_t> uvs;
|
std::vector<real_t> uvs;
|
||||||
|
std::string parent;
|
||||||
DeferredObject(const std::string& unique_id, const std::string& representation_id, const std::string& type, const std::vector<real_t>& matrix,
|
DeferredObject(const std::string& unique_id, const std::string& representation_id, const std::string& type, const std::vector<real_t>& matrix,
|
||||||
const std::vector<real_t>& vertices, const std::vector<real_t>& normals, const std::vector<int>& faces,
|
const std::vector<real_t>& vertices, const std::vector<real_t>& normals, const std::vector<int>& faces,
|
||||||
const std::vector<int>& edges, const std::vector<int>& material_ids, const std::vector<IfcGeom::Material>& materials,
|
const std::vector<int>& edges, const std::vector<int>& material_ids, const std::vector<IfcGeom::Material>& materials,
|
||||||
const std::vector<std::string>& material_references, const std::vector<real_t>& uvs)
|
const std::vector<std::string>& material_references, const std::vector<real_t>& uvs, const std::string& parent)
|
||||||
: unique_id(unique_id)
|
: unique_id(unique_id)
|
||||||
, representation_id(representation_id)
|
, representation_id(representation_id)
|
||||||
, type(type)
|
, type(type)
|
||||||
@@ -148,6 +149,7 @@ private:
|
|||||||
, materials(materials)
|
, materials(materials)
|
||||||
, material_references(material_references)
|
, material_references(material_references)
|
||||||
, uvs(uvs)
|
, uvs(uvs)
|
||||||
|
, parent(parent)
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
COLLADABU::NativeString filename;
|
COLLADABU::NativeString filename;
|
||||||
|
|||||||
Reference in New Issue
Block a user