2023-08-12 02:42:11 +05:30
|
|
|
#ifndef PARSEIFCFILE_H
|
|
|
|
|
#define PARSEIFCFILE_H
|
|
|
|
|
|
2024-09-24 11:58:57 -07:00
|
|
|
#include "../ifcgeom/Iterator.h"
|
|
|
|
|
#include "osg/Geometry"
|
|
|
|
|
#include "osg/Material"
|
|
|
|
|
#include "osg/MatrixTransform"
|
|
|
|
|
#include "osg/ref_ptr"
|
|
|
|
|
|
2023-08-29 09:48:27 +05:30
|
|
|
#include <QObject>
|
|
|
|
|
#include <QString>
|
2023-08-12 02:42:11 +05:30
|
|
|
#include <string>
|
2023-09-12 12:57:40 +05:30
|
|
|
#include <vector>
|
|
|
|
|
|
2024-09-24 11:58:57 -07:00
|
|
|
class ParseIfcFile : public QObject {
|
2023-09-12 12:57:40 +05:30
|
|
|
|
2024-09-24 11:58:57 -07:00
|
|
|
public:
|
2023-08-12 02:42:11 +05:30
|
|
|
ParseIfcFile();
|
|
|
|
|
~ParseIfcFile();
|
|
|
|
|
|
2023-09-12 12:57:40 +05:30
|
|
|
bool Parse(
|
|
|
|
|
const std::string& filePath,
|
2024-09-24 11:58:57 -07:00
|
|
|
std::vector<osg::ref_ptr<osg::MatrixTransform>>& matrixTransforms);
|
2023-09-12 12:57:40 +05:30
|
|
|
|
2024-09-24 11:58:57 -07:00
|
|
|
private:
|
2023-09-14 12:36:45 +05:30
|
|
|
void buildTriangleNodes(
|
|
|
|
|
const std::vector<int>& fVertIds,
|
2024-09-24 11:58:57 -07:00
|
|
|
const std::vector<double>& elemVertices,
|
2023-09-14 12:36:45 +05:30
|
|
|
const std::vector<double>& elemNormals,
|
|
|
|
|
size_t index,
|
|
|
|
|
osg::ref_ptr<osg::Vec3Array> osgVertices,
|
|
|
|
|
osg::ref_ptr<osg::Vec3Array> osgNormals);
|
|
|
|
|
|
2024-09-24 11:58:57 -07:00
|
|
|
osg::ref_ptr<osg::Material> getOsgMaterial(const ifcopenshell::geometry::taxonomy::style::ptr& material);
|
2023-08-12 02:42:11 +05:30
|
|
|
};
|
|
|
|
|
|
2023-09-05 17:51:25 +05:30
|
|
|
#endif // PARSEIFCFILE_H
|