MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / initBufferViews

Function initBufferViews

src/gltf/GltfForwardTranslator.cpp:102–112  ·  view source on GitHub ↗

Initializes our two main Buffer Views one for the indices & other for Coordinates and Normals

Source from the content-addressed store, hash-verified

100 // Initializes our two main Buffer Views
101 // one for the indices & other for Coordinates and Normals
102 void initBufferViews(tinygltf::BufferView& indicesBv, tinygltf::BufferView& coordinatesBv) {
103 indicesBv.buffer = 0;
104 // defining bytestride is not required in this case
105 indicesBv.target = TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER;
106
107 // The vertices take up 36 bytes (3 vertices * 3 floating points * 4 bytes)
108 // at position 8 in the buffer and are of type ARRAY_BUFFER
109 coordinatesBv.buffer = 0;
110 coordinatesBv.target = TINYGLTF_TARGET_ARRAY_BUFFER;
111 coordinatesBv.byteStride = 12;
112 }
113
114 // Finds the vertex Index from all Vertices of a planar Surface
115 // param : point3d

Callers 1

toGltfModelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected