2023-08-12 02:42:11 +05:30
|
|
|
#ifndef PARSEIFCFILE_H
|
|
|
|
|
#define PARSEIFCFILE_H
|
|
|
|
|
|
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>
|
|
|
|
|
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
|
|
|
|
#include "osg/Material"
|
2023-12-20 01:19:36 +05:30
|
|
|
#include "osg/MatrixTransform"
|
2023-09-12 12:57:40 +05:30
|
|
|
#include "osg/ref_ptr"
|
|
|
|
|
#include "osg/Geometry"
|
|
|
|
|
|
2023-08-29 09:48:27 +05:30
|
|
|
class ParseIfcFile : public QObject
|
2023-08-12 02:42:11 +05:30
|
|
|
{
|
2023-09-12 12:57:40 +05:30
|
|
|
|
2023-08-12 02:42:11 +05:30
|
|
|
public:
|
|
|
|
|
ParseIfcFile();
|
|
|
|
|
~ParseIfcFile();
|
|
|
|
|
|
2023-09-12 12:57:40 +05:30
|
|
|
bool Parse(
|
|
|
|
|
const std::string& filePath,
|
2023-12-20 01:19:36 +05:30
|
|
|
std::vector<osg::ref_ptr<osg::MatrixTransform>>& matrixTransforms
|
2023-09-12 12:57:40 +05:30
|
|
|
);
|
|
|
|
|
|
|
|
|
|
private:
|
2023-09-14 12:36:45 +05:30
|
|
|
void buildTriangleNodes(
|
|
|
|
|
const std::vector<int>& fVertIds,
|
|
|
|
|
const std::vector<double>& elemVertices,
|
|
|
|
|
const std::vector<double>& elemNormals,
|
|
|
|
|
size_t index,
|
|
|
|
|
osg::ref_ptr<osg::Vec3Array> osgVertices,
|
|
|
|
|
osg::ref_ptr<osg::Vec3Array> osgNormals);
|
|
|
|
|
|
2023-09-12 12:57:40 +05:30
|
|
|
osg::ref_ptr<osg::Material> getOsgMaterial(const IfcGeom::Material& material);
|
2023-08-12 02:42:11 +05:30
|
|
|
};
|
|
|
|
|
|
2023-09-05 17:51:25 +05:30
|
|
|
#endif // PARSEIFCFILE_H
|