Create constants ELEMENT_ARRAY_BUFFER and ARRAY_BUFFER to allow for more descriptive bufferview construction. Change the bufferViewId variable from a static variable to a member variable because python instances of IfcOpenShell can have multiple serializers open at any given time. This commit also includes some minor code reformatting and code comments explaining the changes done. Finally integer constants GLB_FILE_HEAER, GLB_JSON_HEADER, GLB_BINARY_CHUNK_HEADER were added to make the glb file header creation more descriptive

This commit is contained in:
Chetan
2023-08-28 13:54:21 +08:00
parent f4cce9878f
commit 76708dd8ce
2 changed files with 26 additions and 12 deletions
+2
View File
@@ -36,6 +36,8 @@ private:
std::ofstream fstream_, tmp_fstream1_, tmp_fstream2_;
std::map<std::string, int> materials_, meshes_;
json json_, node_array_;
int bufferViewId;
int writeMaterial(const ifcopenshell::geometry::taxonomy::style& style);
public: