Implemented: Application icons; OpenSceneGraph to handle OpenGL with Qt; devicePixelRatio() for handing render on highDPI displays; Sample 3D with handler; MouseHandler not yet working as expected (WIP)

This commit is contained in:
dushyant basson
2023-09-05 17:51:25 +05:30
committed by Thomas Krijnen
parent f824ee8ca4
commit 9e9b294f44
12 changed files with 321 additions and 45 deletions
+5 -9
View File
@@ -1,4 +1,5 @@
#include "ParseIfcFile.h"
#include "MessageLogger.h"
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
@@ -6,11 +7,6 @@ ParseIfcFile::ParseIfcFile() {}
ParseIfcFile::~ParseIfcFile() {}
void ParseIfcFile::outputMsg(const std::string& msg)
{
emit parsingInfo(QString::fromStdString(msg));
}
void ParseIfcFile::Parse(const std::string& filePath)
{
IfcParse::IfcFile file(filePath);
@@ -21,7 +17,7 @@ void ParseIfcFile::Parse(const std::string& filePath)
IfcGeom::Iterator* it = new IfcGeom::Iterator(settings, &file);
if (!it->initialize()) {
outputMsg("Error: Iterator failed to initialize! Aborting.");
MessageLogger::log("Error: Iterator failed to initialize! Aborting.");
delete it;
return;
}
@@ -29,14 +25,14 @@ void ParseIfcFile::Parse(const std::string& filePath)
do {
//const IfcGeom::BRepElement* bRepElem = it->get_native();
const IfcGeom::TriangulationElement* triElem = static_cast<const IfcGeom::TriangulationElement*>(it->get());
outputMsg(triElem->type() + ": " + triElem->name());
MessageLogger::log(triElem->type() + ": " + triElem->name());
const boost::shared_ptr<IfcGeom::Representation::Triangulation>& triElemGeom = triElem->geometry_pointer();
// materials
const std::vector<IfcGeom::Material>& elemMats = triElemGeom->materials();
for (auto mat : elemMats) {
outputMsg(" " + mat.original_name());
MessageLogger::log(" " + mat.original_name());
}
} while (it->next());
}
}