clean WIP

This commit is contained in:
Balleux Benjamin
2017-04-20 15:06:49 +02:00
parent 8e4febecc0
commit 7ce795def3
3 changed files with 24 additions and 36 deletions
+1 -25
View File
@@ -335,30 +335,6 @@ void ColladaSerializer::ColladaExporter::startDocument(const std::string& unit_n
asset.add();
}
void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationElement<real_t>* o)
{
const IfcGeom::Representation::Triangulation<real_t>& mesh = o->geometry();
const std::string name = serializer->settings().get(SerializerSettings::USE_ELEMENT_GUIDS) ?
o->guid() : (serializer->settings().get(SerializerSettings::USE_ELEMENT_NAMES) ?
o->name() : (serializer->settings().get(SerializerSettings::USE_ELEMENT_TYPES) ? o->type() : o->unique_id()));
const std::string representation_id = "representation-" + boost::lexical_cast<std::string>(o->geometry().id());
std::vector<std::string> material_references;
foreach(const IfcGeom::Material& material, mesh.materials()) {
if (!materials.contains(material)) {
materials.add(material);
}
std::string material_name = (serializer->settings().get(SerializerSettings::USE_MATERIAL_NAMES)
? material.original_name() : material.name());
collada_id(material_name);
material_references.push_back(material_name);
}
deferreds.push_back(
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())
);
}
void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationElement<real_t>* o, const IfcGeom::Element<real_t>* parent)
{
const IfcGeom::Representation::Triangulation<real_t>& mesh = o->geometry();
@@ -433,7 +409,7 @@ void ColladaSerializer::writeHeader() {
}
void ColladaSerializer::write(const IfcGeom::TriangulationElement<real_t>* o) {
exporter.write(o);
exporter.write(o, NULL);
}
void ColladaSerializer::write(const IfcGeom::TriangulationElement<real_t>* o, const IfcGeom::Element<real_t>* parent)