cesium-native 0.43.0
Loading...
Searching...
No Matches
PropertyTablePropertyView.h
1#pragma once
2
3#include "CesiumGltf/PropertyArrayView.h"
4#include "CesiumGltf/PropertyTransformations.h"
5#include "CesiumGltf/PropertyTypeTraits.h"
6#include "CesiumGltf/PropertyView.h"
7
8#include <CesiumUtility/Assert.h>
9
10#include <cstddef>
11#include <cstdint>
12#include <span>
13#include <string_view>
14#include <type_traits>
15
16namespace CesiumGltf {
26public:
32
37
43
49
55
61
67
73
78 static const PropertyViewStatusType
80
85 static const PropertyViewStatusType
87
93 24;
94
100 25;
101
106
111
117
123
128
133};
134
139int64_t getOffsetTypeSize(PropertyComponentType offsetType) noexcept;
140
145template <typename ElementType, bool Normalized = false>
147
162template <typename ElementType>
163class PropertyTablePropertyView<ElementType, false>
164 : public PropertyView<ElementType, false> {
165public:
170 : PropertyView<ElementType, false>(),
171 _values{},
172 _size{0},
173 _arrayOffsets{},
174 _arrayOffsetType{PropertyComponentType::None},
175 _arrayOffsetTypeSize{0},
176 _stringOffsets{},
177 _stringOffsetType{PropertyComponentType::None},
178 _stringOffsetTypeSize{0} {}
179
186 : PropertyView<ElementType, false>(status),
187 _values{},
188 _size{0},
189 _arrayOffsets{},
190 _arrayOffsetType{PropertyComponentType::None},
191 _arrayOffsetTypeSize{0},
192 _stringOffsets{},
193 _stringOffsetType{PropertyComponentType::None},
194 _stringOffsetTypeSize{0} {
195 CESIUM_ASSERT(
197 "An empty property view should not be constructed with a valid status");
198 }
199
209 PropertyTablePropertyView(const ClassProperty& classProperty, int64_t size)
210 : PropertyView<ElementType, false>(classProperty),
211 _values{},
212 _size{0},
213 _arrayOffsets{},
214 _arrayOffsetType{PropertyComponentType::None},
215 _arrayOffsetTypeSize{0},
216 _stringOffsets{},
217 _stringOffsetType{PropertyComponentType::None},
218 _stringOffsetTypeSize{0} {
219 if (this->_status != PropertyTablePropertyViewStatus::Valid) {
220 // Don't override the status / size if something is wrong with the class
221 // property's definition.
222 return;
223 }
224
225 if (!classProperty.defaultProperty) {
226 // This constructor should only be called if the class property *has* a
227 // default value. But in the case that it does not, this property view
228 // becomes invalid.
229 this->_status = PropertyTablePropertyViewStatus::ErrorNonexistentProperty;
230 return;
231 }
232
234 this->_size = size;
235 }
236
247 const PropertyTableProperty& property,
248 const ClassProperty& classProperty,
249 int64_t size,
250 std::span<const std::byte> values) noexcept
251 : PropertyView<ElementType>(classProperty, property),
252 _values{values},
253 _size{
254 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
255 _arrayOffsets{},
256 _arrayOffsetType{PropertyComponentType::None},
257 _arrayOffsetTypeSize{0},
258 _stringOffsets{},
259 _stringOffsetType{PropertyComponentType::None},
260 _stringOffsetTypeSize{0} {}
261
275 const PropertyTableProperty& property,
276 const ClassProperty& classProperty,
277 int64_t size,
278 std::span<const std::byte> values,
279 std::span<const std::byte> arrayOffsets,
280 std::span<const std::byte> stringOffsets,
281 PropertyComponentType arrayOffsetType,
282 PropertyComponentType stringOffsetType) noexcept
283 : PropertyView<ElementType>(classProperty, property),
284 _values{values},
285 _size{
286 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
287 _arrayOffsets{arrayOffsets},
288 _arrayOffsetType{arrayOffsetType},
289 _arrayOffsetTypeSize{getOffsetTypeSize(arrayOffsetType)},
290 _stringOffsets{stringOffsets},
291 _stringOffsetType{stringOffsetType},
292 _stringOffsetTypeSize{getOffsetTypeSize(stringOffsetType)} {}
293
309 std::optional<PropertyValueViewToCopy<ElementType>>
310 get(int64_t index) const noexcept {
311 if (this->_status ==
313 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
314 CESIUM_ASSERT(index < size() && "index must be less than size");
315
316 return propertyValueViewToCopy(this->defaultValue());
317 }
318
319 ElementType value = getRaw(index);
320
321 if (value == this->noData()) {
322 return propertyValueViewToCopy(this->defaultValue());
323 } else if constexpr (IsMetadataNumeric<ElementType>::value) {
324 return transformValue(value, this->offset(), this->scale());
325 } else if constexpr (IsMetadataNumericArray<ElementType>::value) {
326 return transformArray(value, this->offset(), this->scale());
327 } else {
328 return value;
329 }
330 }
331
342 ElementType getRaw(int64_t index) const noexcept {
343 CESIUM_ASSERT(
345 "Check the status() first to make sure view is valid");
346 CESIUM_ASSERT(
347 size() > 0 &&
348 "Check the size() of the view to make sure it's not empty");
349 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
350 CESIUM_ASSERT(index < size() && "index must be less than size");
351
353 return getNumericValue(index);
354 }
355
357 return getBooleanValue(index);
358 }
359
361 return getStringValue(index);
362 }
363
365 return getNumericArrayValues<
367 }
368
370 return getBooleanArrayValues(index);
371 }
372
374 return getStringArrayValues(index);
375 }
376 }
377
385 int64_t size() const noexcept { return _size; }
386
387private:
388 ElementType getNumericValue(int64_t index) const noexcept {
389 return reinterpret_cast<const ElementType*>(_values.data())[index];
390 }
391
392 bool getBooleanValue(int64_t index) const noexcept {
393 const int64_t byteIndex = index / 8;
394 const int64_t bitIndex = index % 8;
395 const int bitValue = static_cast<int>(_values[byteIndex] >> bitIndex) & 1;
396 return bitValue == 1;
397 }
398
399 std::string_view getStringValue(int64_t index) const noexcept {
400 const size_t currentOffset =
401 getOffsetFromOffsetsBuffer(index, _stringOffsets, _stringOffsetType);
402 const size_t nextOffset = getOffsetFromOffsetsBuffer(
403 index + 1,
404 _stringOffsets,
405 _stringOffsetType);
406 return std::string_view(
407 reinterpret_cast<const char*>(_values.data() + currentOffset),
408 nextOffset - currentOffset);
409 }
410
411 template <typename T>
412 PropertyArrayView<T> getNumericArrayValues(int64_t index) const noexcept {
413 size_t count = static_cast<size_t>(this->arrayCount());
414 // Handle fixed-length arrays
415 if (count > 0) {
416 size_t arraySize = count * sizeof(T);
417 const std::span<const std::byte> values(
418 _values.data() + index * arraySize,
419 arraySize);
420 return PropertyArrayView<T>{values};
421 }
422
423 // Handle variable-length arrays. The offsets are interpreted as array
424 // indices, not byte offsets, so they must be multiplied by sizeof(T)
425 const size_t currentOffset =
426 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType) *
427 sizeof(T);
428 const size_t nextOffset =
429 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType) *
430 sizeof(T);
431 const std::span<const std::byte> values(
432 _values.data() + currentOffset,
433 nextOffset - currentOffset);
434 return PropertyArrayView<T>{values};
435 }
436
437 PropertyArrayView<std::string_view>
438 getStringArrayValues(int64_t index) const noexcept {
439 size_t count = static_cast<size_t>(this->arrayCount());
440 // Handle fixed-length arrays
441 if (count > 0) {
442 // Copy the corresponding string offsets to pass to the PropertyArrayView.
443 const size_t arraySize = count * _stringOffsetTypeSize;
444 const std::span<const std::byte> stringOffsetValues(
445 _stringOffsets.data() + index * arraySize,
446 arraySize + _stringOffsetTypeSize);
447 return PropertyArrayView<std::string_view>(
448 _values,
449 stringOffsetValues,
450 _stringOffsetType,
451 count);
452 }
453
454 // Handle variable-length arrays
455 const size_t currentArrayOffset =
456 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType);
457 const size_t nextArrayOffset =
458 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType);
459 const size_t arraySize = nextArrayOffset - currentArrayOffset;
460 const std::span<const std::byte> stringOffsetValues(
461 _stringOffsets.data() + currentArrayOffset,
462 arraySize + _arrayOffsetTypeSize);
463 return PropertyArrayView<std::string_view>(
464 _values,
465 stringOffsetValues,
466 _stringOffsetType,
467 arraySize / _arrayOffsetTypeSize);
468 }
469
470 PropertyArrayView<bool> getBooleanArrayValues(int64_t index) const noexcept {
471 size_t count = static_cast<size_t>(this->arrayCount());
472 // Handle fixed-length arrays
473 if (count > 0) {
474 const size_t offsetBits = count * index;
475 const size_t nextOffsetBits = count * (index + 1);
476 const std::span<const std::byte> buffer(
477 _values.data() + offsetBits / 8,
478 (nextOffsetBits / 8 - offsetBits / 8 + 1));
479 return PropertyArrayView<bool>(buffer, offsetBits % 8, count);
480 }
481
482 // Handle variable-length arrays
483 const size_t currentOffset =
484 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType);
485 const size_t nextOffset =
486 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType);
487 const size_t totalBits = nextOffset - currentOffset;
488 const std::span<const std::byte> buffer(
489 _values.data() + currentOffset / 8,
490 (nextOffset / 8 - currentOffset / 8 + 1));
491 return PropertyArrayView<bool>(buffer, currentOffset % 8, totalBits);
492 }
493
494 std::span<const std::byte> _values;
495 int64_t _size;
496
497 std::span<const std::byte> _arrayOffsets;
498 PropertyComponentType _arrayOffsetType;
499 int64_t _arrayOffsetTypeSize;
500
501 std::span<const std::byte> _stringOffsets;
502 PropertyComponentType _stringOffsetType;
503 int64_t _stringOffsetTypeSize;
504};
505
520template <typename ElementType>
521class PropertyTablePropertyView<ElementType, true>
522 : public PropertyView<ElementType, true> {
523private:
524 using NormalizedType = typename TypeToNormalizedType<ElementType>::type;
525
526public:
531 : PropertyView<ElementType, true>(),
532 _values{},
533 _size{0},
534 _arrayOffsets{},
535 _arrayOffsetType{PropertyComponentType::None},
536 _arrayOffsetTypeSize{0} {}
537
544 : PropertyView<ElementType, true>(status),
545 _values{},
546 _size{0},
547 _arrayOffsets{},
548 _arrayOffsetType{PropertyComponentType::None},
549 _arrayOffsetTypeSize{0} {
550 CESIUM_ASSERT(
552 "An empty property view should not be constructed with a valid status");
553 }
554
564 PropertyTablePropertyView(const ClassProperty& classProperty, int64_t size)
565 : PropertyView<ElementType, true>(classProperty),
566 _values{},
567 _size{0},
568 _arrayOffsets{},
569 _arrayOffsetType{PropertyComponentType::None},
570 _arrayOffsetTypeSize{0} {
571 if (this->_status != PropertyTablePropertyViewStatus::Valid) {
572 // Don't override the status / size if something is wrong with the class
573 // property's definition.
574 return;
575 }
576
577 if (!classProperty.defaultProperty) {
578 // This constructor should only be called if the class property *has* a
579 // default value. But in the case that it does not, this property view
580 // becomes invalid.
581 this->_status = PropertyTablePropertyViewStatus::ErrorNonexistentProperty;
582 return;
583 }
584
586 this->_size = size;
587 }
588
599 const PropertyTableProperty& property,
600 const ClassProperty& classProperty,
601 int64_t size,
602 std::span<const std::byte> values) noexcept
603 : PropertyView<ElementType, true>(classProperty, property),
604 _values{values},
605 _size{
606 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
607 _arrayOffsets{},
608 _arrayOffsetType{PropertyComponentType::None},
609 _arrayOffsetTypeSize{0} {}
610
623 const PropertyTableProperty& property,
624 const ClassProperty& classProperty,
625 int64_t size,
626 std::span<const std::byte> values,
627 std::span<const std::byte> arrayOffsets,
628 PropertyComponentType arrayOffsetType) noexcept
629 : PropertyView<ElementType, true>(classProperty, property),
630 _values{values},
631 _size{
632 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
633 _arrayOffsets{arrayOffsets},
634 _arrayOffsetType{arrayOffsetType},
635 _arrayOffsetTypeSize{getOffsetTypeSize(arrayOffsetType)} {}
636
652 std::optional<PropertyValueViewToCopy<NormalizedType>>
653 get(int64_t index) const noexcept {
654 if (this->_status ==
656 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
657 CESIUM_ASSERT(index < size() && "index must be less than size");
658
659 return propertyValueViewToCopy(this->defaultValue());
660 }
661
662 ElementType value = getRaw(index);
663 if (this->noData() && value == *(this->noData())) {
664 return propertyValueViewToCopy(this->defaultValue());
665 } else if constexpr (IsMetadataScalar<ElementType>::value) {
668 this->offset(),
669 this->scale());
670 } else if constexpr (IsMetadataVecN<ElementType>::value) {
671 constexpr glm::length_t N = ElementType::length();
672 using T = typename ElementType::value_type;
673 using NormalizedT = typename NormalizedType::value_type;
675 normalize<N, T>(value),
676 this->offset(),
677 this->scale());
678 } else if constexpr (IsMetadataMatN<ElementType>::value) {
679 constexpr glm::length_t N = ElementType::length();
680 using T = typename ElementType::value_type;
681 using NormalizedT = typename NormalizedType::value_type;
683 normalize<N, T>(value),
684 this->offset(),
685 this->scale());
686 } else if constexpr (IsMetadataArray<ElementType>::value) {
687 using ArrayElementType = typename MetadataArrayType<ElementType>::type;
690 value,
691 this->offset(),
692 this->scale());
693 } else if constexpr (IsMetadataVecN<ArrayElementType>::value) {
694 constexpr glm::length_t N = ArrayElementType::length();
695 using T = typename ArrayElementType::value_type;
697 value,
698 this->offset(),
699 this->scale());
700 } else if constexpr (IsMetadataMatN<ArrayElementType>::value) {
701 constexpr glm::length_t N = ArrayElementType::length();
702 using T = typename ArrayElementType::value_type;
704 value,
705 this->offset(),
706 this->scale());
707 }
708 }
709 }
710
721 ElementType getRaw(int64_t index) const noexcept {
722 CESIUM_ASSERT(
724 "Check the status() first to make sure view is valid");
725 CESIUM_ASSERT(
726 size() > 0 &&
727 "Check the size() of the view to make sure it's not empty");
728 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
729 CESIUM_ASSERT(index < size() && "index must be less than size");
730
732 return getValue(index);
733 }
734
736 return getArrayValues<typename MetadataArrayType<ElementType>::type>(
737 index);
738 }
739 }
740
748 int64_t size() const noexcept {
749 return this->_status == PropertyTablePropertyViewStatus::Valid ? _size : 0;
750 }
751
752private:
753 ElementType getValue(int64_t index) const noexcept {
754 return reinterpret_cast<const ElementType*>(_values.data())[index];
755 }
756
757 template <typename T>
758 PropertyArrayView<T> getArrayValues(int64_t index) const noexcept {
759 size_t count = static_cast<size_t>(this->arrayCount());
760 // Handle fixed-length arrays
761 if (count > 0) {
762 size_t arraySize = count * sizeof(T);
763 const std::span<const std::byte> values(
764 _values.data() + index * arraySize,
765 arraySize);
766 return PropertyArrayView<T>{values};
767 }
768
769 // Handle variable-length arrays. The offsets are interpreted as array
770 // indices, not byte offsets, so they must be multiplied by sizeof(T)
771 const size_t currentOffset =
772 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType) *
773 sizeof(T);
774 const size_t nextOffset =
775 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType) *
776 sizeof(T);
777 const std::span<const std::byte> values(
778 _values.data() + currentOffset,
779 nextOffset - currentOffset);
780 return PropertyArrayView<T>{values};
781 }
782
783 std::span<const std::byte> _values;
784 int64_t _size;
785
786 std::span<const std::byte> _arrayOffsets;
787 PropertyComponentType _arrayOffsetType;
788 int64_t _arrayOffsetTypeSize;
789};
790
791} // namespace CesiumGltf
Indicates the status of a property table property view.
static const PropertyViewStatusType ErrorBufferViewSizeDoesNotMatchPropertyTableCount
This property view has an invalid buffer view; its length does not match the size of the property tab...
static const PropertyViewStatusType ErrorInvalidArrayOffsetBufferView
This array property view does not have a valid array offset buffer view index.
static const PropertyViewStatusType ErrorBufferViewOutOfBounds
This property view has a buffer view that points outside the bounds of its target buffer.
static const PropertyViewStatusType ErrorArrayCountAndOffsetBufferCoexist
This array property view has both a fixed length and an offset buffer view defined.
static const PropertyViewStatusType ErrorInvalidValueBufferView
This property view does not have a valid value buffer view index.
static const PropertyViewStatusType ErrorInvalidStringOffsetBuffer
This property view has a valid string offset buffer view, but the buffer view specifies an invalid bu...
static const PropertyViewStatusType ErrorInvalidStringOffsetType
This property view has an unknown string offset type.
static const PropertyViewStatusType ErrorArrayCountAndOffsetBufferDontExist
This array property view has neither a fixed length nor an offset buffer view defined.
static const PropertyViewStatusType ErrorArrayOffsetsNotSorted
This property view's array offset values are not sorted in ascending order.
static const PropertyViewStatusType ErrorInvalidArrayOffsetBuffer
This property view has a valid array string buffer view, but the buffer view specifies an invalid buf...
static const PropertyViewStatusType ErrorArrayOffsetOutOfBounds
This property view has an array offset that is out of bounds.
static const PropertyViewStatusType ErrorInvalidPropertyTable
This property view was initialized from an invalid PropertyTable.
static const PropertyViewStatusType ErrorInvalidValueBuffer
This property view has a valid value buffer view, but the buffer view specifies an invalid buffer ind...
static const PropertyViewStatusType ErrorInvalidStringOffsetBufferView
This string property view does not have a valid string offset buffer view index.
static const PropertyViewStatusType ErrorInvalidArrayOffsetType
This property view has an unknown array offset type.
static const PropertyViewStatusType ErrorStringOffsetsNotSorted
This property view's string offset values are not sorted in ascending order.
static const PropertyViewStatusType ErrorStringOffsetOutOfBounds
This property view has a string offset that is out of bounds.
static const PropertyViewStatusType ErrorBufferViewSizeNotDivisibleByTypeSize
This property view has an invalid buffer view; its length is not a multiple of the size of its type /...
PropertyTablePropertyView(const ClassProperty &classProperty, int64_t size)
Constructs an instance of an empty property that specifies a default value. Although this property ha...
PropertyTablePropertyView(const PropertyTableProperty &property, const ClassProperty &classProperty, int64_t size, std::span< const std::byte > values, std::span< const std::byte > arrayOffsets, std::span< const std::byte > stringOffsets, PropertyComponentType arrayOffsetType, PropertyComponentType stringOffsetType) noexcept
Construct an instance pointing to the data specified by a PropertyTableProperty.
PropertyTablePropertyView()
Constructs an invalid instance for a non-existent property.
std::optional< PropertyValueViewToCopy< ElementType > > get(int64_t index) const noexcept
Get the value of an element in the PropertyTable, with all value transforms applied....
ElementType getRaw(int64_t index) const noexcept
Get the raw value of an element of the PropertyTable, without offset or scale applied.
PropertyTablePropertyView(PropertyViewStatusType status)
Constructs an invalid instance for an erroneous property.
int64_t size() const noexcept
Get the number of elements in this PropertyTablePropertyView. If the view is valid,...
PropertyTablePropertyView(const PropertyTableProperty &property, const ClassProperty &classProperty, int64_t size, std::span< const std::byte > values) noexcept
Construct an instance pointing to data specified by a PropertyTableProperty. Used for non-array or fi...
PropertyTablePropertyView()
Constructs an invalid instance for a non-existent property.
std::optional< PropertyValueViewToCopy< NormalizedType > > get(int64_t index) const noexcept
Get the value of an element of the PropertyTable, with normalization and other value transforms appli...
ElementType getRaw(int64_t index) const noexcept
Get the raw value of an element of the PropertyTable, without offset, scale, or normalization applied...
PropertyTablePropertyView(const PropertyTableProperty &property, const ClassProperty &classProperty, int64_t size, std::span< const std::byte > values) noexcept
Construct an instance pointing to data specified by a PropertyTableProperty. Used for non-array or fi...
PropertyTablePropertyView(PropertyViewStatusType status)
Constructs an invalid instance for an erroneous property.
PropertyTablePropertyView(const PropertyTableProperty &property, const ClassProperty &classProperty, int64_t size, std::span< const std::byte > values, std::span< const std::byte > arrayOffsets, PropertyComponentType arrayOffsetType) noexcept
Construct an instance pointing to the data specified by a PropertyTableProperty.
int64_t size() const noexcept
Get the number of elements in this PropertyTablePropertyView. If the view is valid,...
PropertyTablePropertyView(const ClassProperty &classProperty, int64_t size)
Constructs an instance of an empty property that specifies a default value. Although this property ha...
A view on the data of the PropertyTableProperty that is created by a PropertyTableView.
Indicates the status of a property view.
static const PropertyViewStatusType Valid
This property view is valid and ready to use.
static const PropertyViewStatusType EmptyPropertyWithDefault
This property view does not contain any data, but specifies a default value. This happens when a clas...
Represents a metadata property in EXT_structural_metadata.
Classes for working with glTF models.
PropertyComponentType
The possible types of a property component.
PropertyArrayCopy< glm::mat< N, N, double > > transformNormalizedMatNArray(const PropertyArrayView< glm::mat< N, N, T > > &value, const std::optional< PropertyArrayView< glm::mat< N, N, double > > > &offset, const std::optional< PropertyArrayView< glm::mat< N, N, double > > > &scale)
Normalizes each element of an array of matrices and transforms them by optional offset and scale fact...
PropertyArrayCopy< glm::vec< N, double > > transformNormalizedVecNArray(const PropertyArrayView< glm::vec< N, T > > &value, const std::optional< PropertyArrayView< glm::vec< N, double > > > &offset, const std::optional< PropertyArrayView< glm::vec< N, double > > > &scale)
Normalizes each element of an array of vectors and transforms them by optional offset and scale facto...
PropertyArrayCopy< NormalizedType > transformNormalizedArray(const PropertyArrayView< T > &value, const std::optional< PropertyArrayView< NormalizedType > > &offset, const std::optional< PropertyArrayView< NormalizedType > > &scale)
Normalizes each element of an array of values and transforms them by optional offset and scale factor...
T transformValue(const T &value, const std::optional< T > &offset, const std::optional< T > &scale)
Transforms the value by optional offset and scale factors.
double normalize(T value)
Normalizes the given value between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maxim...
int64_t getOffsetTypeSize(PropertyComponentType offsetType) noexcept
Returns the size in bytes of a PropertyComponentType used as the arrayOffsetType in the constructor o...
PropertyArrayCopy< T > transformArray(const PropertyArrayView< T > &value, const std::optional< PropertyArrayView< T > > &offset, const std::optional< PropertyArrayView< T > > &scale)
Transforms each element of an array of values by optional offset and scale factors....
int32_t PropertyViewStatusType
The type used for fields of PropertyViewStatus.
std::optional< CesiumUtility::JsonValue > defaultProperty
A default value to use when encountering a noData value or an omitted property. The value is given in...
Check if a C++ type can be represented as an array.
Check if a C++ type can be represented as an array of booleans property type.
Check if a C++ type can be represented as a boolean property type.
Check if a C++ type can be represented as a matN type.
Check if a C++ type can be represented as an array of numeric elements property type.
Check if a C++ type can be represented as a numeric property, i.e. a scalar / vecN / matN type.
Check if a C++ type can be represented as a scalar property type.
Check if a C++ type can be represented as an array of strings property type.
Check if a C++ type can be represented as a string property type.
Check if a C++ type can be represented as a vecN type.
void type
The component type of this metadata array.
An array of binary property values.
Convert an integer numeric type to the corresponding representation as a double type....