Initializes our two main Buffer Views one for the indices & other for Coordinates and Normals
| 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 |