MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / getBufferGeometry

Function getBufferGeometry

tests/regression/regression.mjs:119–139  ·  view source on GitHub ↗
(modelID, placedGeometry)

Source from the content-addressed store, hash-verified

117}
118
119function getBufferGeometry(modelID, placedGeometry) {
120 const geometry = ifcAPI.GetGeometry(
121 modelID,
122 placedGeometry.geometryExpressID
123 );
124 const verts = ifcAPI.GetVertexArray(
125 geometry.GetVertexData(),
126 geometry.GetVertexDataSize()
127 );
128 const indices = ifcAPI.GetIndexArray(
129 geometry.GetIndexData(),
130 geometry.GetIndexDataSize()
131 );
132 const bufferGeometry = ifcGeometryToBuffer(
133 placedGeometry.color,
134 verts,
135 indices
136 );
137 geometry.delete();
138 return bufferGeometry;
139}
140
141function getMeshMaterial(color) {
142 let colID = `${color.x}${color.y}${color.z}${color.w}`;

Callers 1

getPlacedGeometryFunction · 0.85

Calls 9

ifcGeometryToBufferFunction · 0.85
GetGeometryMethod · 0.80
GetVertexArrayMethod · 0.80
GetIndexArrayMethod · 0.80
GetVertexDataMethod · 0.65
GetVertexDataSizeMethod · 0.65
GetIndexDataMethod · 0.65
GetIndexDataSizeMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected