| 24 | } |
| 25 | |
| 26 | void GLTF::BufferView::writeJSON(void* writer, GLTF::Options* options) { |
| 27 | rapidjson::Writer<rapidjson::StringBuffer>* jsonWriter = (rapidjson::Writer<rapidjson::StringBuffer>*)writer; |
| 28 | if (this->buffer) { |
| 29 | jsonWriter->Key("buffer"); |
| 30 | if (options->version == "1.0") { |
| 31 | jsonWriter->String(buffer->getStringId().c_str()); |
| 32 | } |
| 33 | else { |
| 34 | jsonWriter->Int(this->buffer->id); |
| 35 | } |
| 36 | } |
| 37 | jsonWriter->Key("byteOffset"); |
| 38 | jsonWriter->Int(this->byteOffset); |
| 39 | jsonWriter->Key("byteLength"); |
| 40 | jsonWriter->Int(this->byteLength); |
| 41 | if (byteStride != 0 && options->version != "1.0") { |
| 42 | jsonWriter->Key("byteStride"); |
| 43 | jsonWriter->Int(this->byteStride); |
| 44 | } |
| 45 | if ((int)target > 0) { |
| 46 | jsonWriter->Key("target"); |
| 47 | jsonWriter->Int((int)this->target); |
| 48 | } |
| 49 | } |
nothing calls this directly
no test coverage detected