mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
initial camera-orientation; multiple materials in a single element; default material used from IfcGeom; improved triangle node data generation for OSG
This commit is contained in:
committed by
Thomas Krijnen
parent
e4ce53d548
commit
832618b84a
@@ -10,17 +10,6 @@
|
||||
#include "osg/ref_ptr"
|
||||
#include "osg/Geometry"
|
||||
|
||||
struct VertexWithNormal {
|
||||
osg::Vec3 vertex;
|
||||
osg::Vec3 normal;
|
||||
};
|
||||
|
||||
struct Triangle {
|
||||
VertexWithNormal vn1;
|
||||
VertexWithNormal vn2;
|
||||
VertexWithNormal vn3;
|
||||
};
|
||||
|
||||
class ParseIfcFile : public QObject
|
||||
{
|
||||
|
||||
@@ -34,12 +23,14 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
std::vector<Triangle> createTriangles(
|
||||
const std::vector<int>& elemFaces,
|
||||
const std::vector<double>& elemVertices,
|
||||
const std::vector<double>& elemNormals
|
||||
);
|
||||
osg::Vec4 getDefaultOsgDiffuseColor();
|
||||
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);
|
||||
|
||||
osg::ref_ptr<osg::Material> getOsgMaterial(const IfcGeom::Material& material);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user