|
3 | 3 |
|
4 | 4 | This file is part of Kuesa.
|
5 | 5 |
|
6 |
| - Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected] |
| 6 | + Copyright (C) 2018-2019 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected] |
7 | 7 | Author: Juan Jose Casafranca <[email protected]>
|
8 | 8 |
|
9 | 9 | Licensees holding valid proprietary KDAB Kuesa licenses may use this file in
|
@@ -171,7 +171,7 @@ std::pair<QString, int> addAttributeToMesh(const Qt3DRender::QAttribute &attribu
|
171 | 171 | draco::PointAttribute meshAttribute;
|
172 | 172 | meshAttribute.Init(attributeTypeFromName(attribute.name()),
|
173 | 173 | nullptr,
|
174 |
| - static_cast<int8_t>(attribute.vertexSize()), |
| 174 | + static_cast<qint8>(attribute.vertexSize()), |
175 | 175 | dracoDataType,
|
176 | 176 | false,
|
177 | 177 | actualStride<T>(attribute.byteStride(), attribute.vertexSize()),
|
@@ -216,7 +216,7 @@ template<typename T>
|
216 | 216 | bool compressAttribute(
|
217 | 217 | const Qt3DRender::QAttribute &attribute,
|
218 | 218 | draco::Mesh &dracoMesh,
|
219 |
| - std::vector<std::pair<QString, int>>& attributes) |
| 219 | + std::vector<std::pair<QString, int>> &attributes) |
220 | 220 | {
|
221 | 221 | auto compressedAttr = addAttributeToMesh<T>(attribute, dracoMesh);
|
222 | 222 | if (compressedAttr.second == -1) {
|
@@ -273,43 +273,43 @@ CompressedMesh compressMesh(
|
273 | 273 |
|
274 | 274 | switch (attribute->vertexBaseType()) {
|
275 | 275 | case Qt3DRender::QAttribute::VertexBaseType::Float: {
|
276 |
| - if(!compressAttribute<float>(*attribute, dracoMesh, attributes)) |
| 276 | + if (!compressAttribute<float>(*attribute, dracoMesh, attributes)) |
277 | 277 | return {};
|
278 | 278 | break;
|
279 | 279 | }
|
280 | 280 | case Qt3DRender::QAttribute::VertexBaseType::Byte: {
|
281 | 281 | static_assert (std::numeric_limits<qint8>::min() < 0, "This code only works on platforms with signed char");
|
282 |
| - if(!compressAttribute<qint8>(*attribute, dracoMesh, attributes)) |
| 282 | + if (!compressAttribute<qint8>(*attribute, dracoMesh, attributes)) |
283 | 283 | return {};
|
284 | 284 | break;
|
285 | 285 | }
|
286 | 286 | case Qt3DRender::QAttribute::VertexBaseType::UnsignedByte: {
|
287 |
| - if(!compressAttribute<quint8>(*attribute, dracoMesh, attributes)) |
| 287 | + if (!compressAttribute<quint8>(*attribute, dracoMesh, attributes)) |
288 | 288 | return {};
|
289 | 289 | break;
|
290 | 290 | }
|
291 | 291 | case Qt3DRender::QAttribute::VertexBaseType::Short: {
|
292 |
| - if(!compressAttribute<qint16>(*attribute, dracoMesh, attributes)) |
| 292 | + if (!compressAttribute<qint16>(*attribute, dracoMesh, attributes)) |
293 | 293 | return {};
|
294 | 294 | break;
|
295 | 295 | }
|
296 | 296 | case Qt3DRender::QAttribute::VertexBaseType::UnsignedShort: {
|
297 |
| - if(!compressAttribute<quint16>(*attribute, dracoMesh, attributes)) |
| 297 | + if (!compressAttribute<quint16>(*attribute, dracoMesh, attributes)) |
298 | 298 | return {};
|
299 | 299 | break;
|
300 | 300 | }
|
301 | 301 | case Qt3DRender::QAttribute::VertexBaseType::Int: {
|
302 |
| - if(!compressAttribute<qint32>(*attribute, dracoMesh, attributes)) |
| 302 | + if (!compressAttribute<qint32>(*attribute, dracoMesh, attributes)) |
303 | 303 | return {};
|
304 | 304 | break;
|
305 | 305 | }
|
306 | 306 | case Qt3DRender::QAttribute::VertexBaseType::UnsignedInt: {
|
307 |
| - if(!compressAttribute<quint32>(*attribute, dracoMesh, attributes)) |
| 307 | + if (!compressAttribute<quint32>(*attribute, dracoMesh, attributes)) |
308 | 308 | return {};
|
309 | 309 | break;
|
310 | 310 | }
|
311 | 311 | case Qt3DRender::QAttribute::VertexBaseType::Double: {
|
312 |
| - if(!compressAttribute<double>(*attribute, dracoMesh, attributes)) |
| 312 | + if (!compressAttribute<double>(*attribute, dracoMesh, attributes)) |
313 | 313 | return {};
|
314 | 314 | break;
|
315 | 315 | }
|
|
0 commit comments