mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Sort DeferredObject.
This commit is contained in:
@@ -352,6 +352,7 @@ void ColladaSerializer::ColladaExporter::endDocument() {
|
|||||||
// only at this point all objects are written to the stream.
|
// only at this point all objects are written to the stream.
|
||||||
materials.write();
|
materials.write();
|
||||||
std::set<std::string> geometries_written;
|
std::set<std::string> geometries_written;
|
||||||
|
std::sort(deferreds.begin(), deferreds.end());
|
||||||
for (std::vector<DeferredObject>::const_iterator it = deferreds.begin(); it != deferreds.end(); ++it) {
|
for (std::vector<DeferredObject>::const_iterator it = deferreds.begin(); it != deferreds.end(); ++it) {
|
||||||
if (geometries_written.find(it->representation_id) != geometries_written.end()) {
|
if (geometries_written.find(it->representation_id) != geometries_written.end()) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -121,6 +121,10 @@ private:
|
|||||||
ColladaEffects effects;
|
ColladaEffects effects;
|
||||||
};
|
};
|
||||||
class DeferredObject {
|
class DeferredObject {
|
||||||
|
friend bool operator < (const DeferredObject & def_obj1, const DeferredObject & def_obj2)
|
||||||
|
{
|
||||||
|
return (def_obj1.parent < def_obj2.parent ? true : false);
|
||||||
|
}
|
||||||
public:
|
public:
|
||||||
std::string unique_id, representation_id, type;
|
std::string unique_id, representation_id, type;
|
||||||
std::vector<real_t> matrix;
|
std::vector<real_t> matrix;
|
||||||
|
|||||||
Reference in New Issue
Block a user