mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +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.
|
||||
materials.write();
|
||||
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) {
|
||||
if (geometries_written.find(it->representation_id) != geometries_written.end()) {
|
||||
continue;
|
||||
|
||||
@@ -121,6 +121,10 @@ private:
|
||||
ColladaEffects effects;
|
||||
};
|
||||
class DeferredObject {
|
||||
friend bool operator < (const DeferredObject & def_obj1, const DeferredObject & def_obj2)
|
||||
{
|
||||
return (def_obj1.parent < def_obj2.parent ? true : false);
|
||||
}
|
||||
public:
|
||||
std::string unique_id, representation_id, type;
|
||||
std::vector<real_t> matrix;
|
||||
|
||||
Reference in New Issue
Block a user