cesium-native 0.44.2
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#include <CesiumUtility/Assert.h>
8
9#include <cstddef>
10#include <cstdint>
11#include <span>
12#include <string_view>
13#include <type_traits>
14
15namespace CesiumGltf {
25public:
31
36
42
48
54
60
66
72
77 static const PropertyViewStatusType
79
84 static const PropertyViewStatusType
86
92 24;
93
99 25;
100
105
110
116
122
127
132};
133
138int64_t getOffsetTypeSize(PropertyComponentType offsetType) noexcept;
139
144template <typename ElementType, bool Normalized = false>
146
161template <typename ElementType>
162class PropertyTablePropertyView<ElementType, false>
163 : public PropertyView<ElementType, false> {
164public:
169 : PropertyView<ElementType, false>(),
170 _values{},
171 _size{0},
172 _arrayOffsets{},
173 _arrayOffsetType{PropertyComponentType::None},
174 _arrayOffsetTypeSize{0},
175 _stringOffsets{},
176 _stringOffsetType{PropertyComponentType::None},
177 _stringOffsetTypeSize{0} {}
178
185 : PropertyView<ElementType, false>(status),
186 _values{},
187 _size{0},
188 _arrayOffsets{},
189 _arrayOffsetType{PropertyComponentType::None},
190 _arrayOffsetTypeSize{0},
191 _stringOffsets{},
192 _stringOffsetType{PropertyComponentType::None},
193 _stringOffsetTypeSize{0} {
194 CESIUM_ASSERT(
196 "An empty property view should not be constructed with a valid status");
197 }
198
208 PropertyTablePropertyView(const ClassProperty& classProperty, int64_t size)
209 : PropertyView<ElementType, false>(classProperty),
210 _values{},
211 _size{0},
212 _arrayOffsets{},
213 _arrayOffsetType{PropertyComponentType::None},
214 _arrayOffsetTypeSize{0},
215 _stringOffsets{},
216 _stringOffsetType{PropertyComponentType::None},
217 _stringOffsetTypeSize{0} {
218 if (this->_status != PropertyTablePropertyViewStatus::Valid) {
219 // Don't override the status / size if something is wrong with the class
220 // property's definition.
221 return;
222 }
223
224 if (!classProperty.defaultProperty) {
225 // This constructor should only be called if the class property *has* a
226 // default value. But in the case that it does not, this property view
227 // becomes invalid.
228 this->_status = PropertyTablePropertyViewStatus::ErrorNonexistentProperty;
229 return;
230 }
231
233 this->_size = size;
234 }
235
246 const PropertyTableProperty& property,
247 const ClassProperty& classProperty,
248 int64_t size,
249 std::span<const std::byte> values) noexcept
250 : PropertyView<ElementType>(classProperty, property),
251 _values{values},
252 _size{
253 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
254 _arrayOffsets{},
255 _arrayOffsetType{PropertyComponentType::None},
256 _arrayOffsetTypeSize{0},
257 _stringOffsets{},
258 _stringOffsetType{PropertyComponentType::None},
259 _stringOffsetTypeSize{0} {}
260
274 const PropertyTableProperty& property,
275 const ClassProperty& classProperty,
276 int64_t size,
277 std::span<const std::byte> values,
278 std::span<const std::byte> arrayOffsets,
279 std::span<const std::byte> stringOffsets,
280 PropertyComponentType arrayOffsetType,
281 PropertyComponentType stringOffsetType) noexcept
282 : PropertyView<ElementType>(classProperty, property),
283 _values{values},
284 _size{
285 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
286 _arrayOffsets{arrayOffsets},
287 _arrayOffsetType{arrayOffsetType},
288 _arrayOffsetTypeSize{getOffsetTypeSize(arrayOffsetType)},
289 _stringOffsets{stringOffsets},
290 _stringOffsetType{stringOffsetType},
291 _stringOffsetTypeSize{getOffsetTypeSize(stringOffsetType)} {}
292
308 std::optional<PropertyValueViewToCopy<ElementType>>
309 get(int64_t index) const noexcept {
310 if (this->_status ==
312 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
313 CESIUM_ASSERT(index < size() && "index must be less than size");
314
315 return propertyValueViewToCopy(this->defaultValue());
316 }
317
318 ElementType value = getRaw(index);
319
320 if (value == this->noData()) {
321 return propertyValueViewToCopy(this->defaultValue());
322 } else if constexpr (IsMetadataNumeric<ElementType>::value) {
323 return transformValue(value, this->offset(), this->scale());
324 } else if constexpr (IsMetadataNumericArray<ElementType>::value) {
325 return transformArray(value, this->offset(), this->scale());
326 } else {
327 return value;
328 }
329 }
330
341 ElementType getRaw(int64_t index) const noexcept {
342 CESIUM_ASSERT(
344 "Check the status() first to make sure view is valid");
345 CESIUM_ASSERT(
346 size() > 0 &&
347 "Check the size() of the view to make sure it's not empty");
348 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
349 CESIUM_ASSERT(index < size() && "index must be less than size");
350
352 return getNumericValue(index);
353 }
354
356 return getBooleanValue(index);
357 }
358
360 return getStringValue(index);
361 }
362
364 return getNumericArrayValues<
366 }
367
369 return getBooleanArrayValues(index);
370 }
371
373 return getStringArrayValues(index);
374 }
375 }
376
384 int64_t size() const noexcept { return _size; }
385
386private:
387 ElementType getNumericValue(int64_t index) const noexcept {
388 return reinterpret_cast<const ElementType*>(_values.data())[index];
389 }
390
391 bool getBooleanValue(int64_t index) const noexcept {
392 const int64_t byteIndex = index / 8;
393 const int64_t bitIndex = index % 8;
394 const int bitValue = static_cast<int>(_values[byteIndex] >> bitIndex) & 1;
395 return bitValue == 1;
396 }
397
398 std::string_view getStringValue(int64_t index) const noexcept {
399 const size_t currentOffset =
400 getOffsetFromOffsetsBuffer(index, _stringOffsets, _stringOffsetType);
401 const size_t nextOffset = getOffsetFromOffsetsBuffer(
402 index + 1,
403 _stringOffsets,
404 _stringOffsetType);
405 return std::string_view(
406 reinterpret_cast<const char*>(_values.data() + currentOffset),
407 nextOffset - currentOffset);
408 }
409
410 template <typename T>
411 PropertyArrayView<T> getNumericArrayValues(int64_t index) const noexcept {
412 size_t count = static_cast<size_t>(this->arrayCount());
413 // Handle fixed-length arrays
414 if (count > 0) {
415 size_t arraySize = count * sizeof(T);
416 const std::span<const std::byte> values(
417 _values.data() + index * arraySize,
418 arraySize);
419 return PropertyArrayView<T>{values};
420 }
421
422 // Handle variable-length arrays. The offsets are interpreted as array
423 // indices, not byte offsets, so they must be multiplied by sizeof(T)
424 const size_t currentOffset =
425 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType) *
426 sizeof(T);
427 const size_t nextOffset =
428 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType) *
429 sizeof(T);
430 const std::span<const std::byte> values(
431 _values.data() + currentOffset,
432 nextOffset - currentOffset);
433 return PropertyArrayView<T>{values};
434 }
435
436 PropertyArrayView<std::string_view>
437 getStringArrayValues(int64_t index) const noexcept {
438 size_t count = static_cast<size_t>(this->arrayCount());
439 // Handle fixed-length arrays
440 if (count > 0) {
441 // Copy the corresponding string offsets to pass to the PropertyArrayView.
442 const size_t arraySize = count * _stringOffsetTypeSize;
443 const std::span<const std::byte> stringOffsetValues(
444 _stringOffsets.data() + index * arraySize,
445 arraySize + _stringOffsetTypeSize);
446 return PropertyArrayView<std::string_view>(
447 _values,
448 stringOffsetValues,
449 _stringOffsetType,
450 count);
451 }
452
453 // Handle variable-length arrays
454 const size_t currentArrayOffset =
455 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType);
456 const size_t nextArrayOffset =
457 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType);
458 const size_t arraySize = nextArrayOffset - currentArrayOffset;
459 const std::span<const std::byte> stringOffsetValues(
460 _stringOffsets.data() + currentArrayOffset,
461 arraySize + _arrayOffsetTypeSize);
462 return PropertyArrayView<std::string_view>(
463 _values,
464 stringOffsetValues,
465 _stringOffsetType,
466 arraySize / _arrayOffsetTypeSize);
467 }
468
469 PropertyArrayView<bool> getBooleanArrayValues(int64_t index) const noexcept {
470 size_t count = static_cast<size_t>(this->arrayCount());
471 // Handle fixed-length arrays
472 if (count > 0) {
473 const size_t offsetBits = count * index;
474 const size_t nextOffsetBits = count * (index + 1);
475 const std::span<const std::byte> buffer(
476 _values.data() + offsetBits / 8,
477 (nextOffsetBits / 8 - offsetBits / 8 + 1));
478 return PropertyArrayView<bool>(buffer, offsetBits % 8, count);
479 }
480
481 // Handle variable-length arrays
482 const size_t currentOffset =
483 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType);
484 const size_t nextOffset =
485 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType);
486 const size_t totalBits = nextOffset - currentOffset;
487 const std::span<const std::byte> buffer(
488 _values.data() + currentOffset / 8,
489 (nextOffset / 8 - currentOffset / 8 + 1));
490 return PropertyArrayView<bool>(buffer, currentOffset % 8, totalBits);
491 }
492
493 std::span<const std::byte> _values;
494 int64_t _size;
495
496 std::span<const std::byte> _arrayOffsets;
497 PropertyComponentType _arrayOffsetType;
498 int64_t _arrayOffsetTypeSize;
499
500 std::span<const std::byte> _stringOffsets;
501 PropertyComponentType _stringOffsetType;
502 int64_t _stringOffsetTypeSize;
503};
504
519template <typename ElementType>
520class PropertyTablePropertyView<ElementType, true>
521 : public PropertyView<ElementType, true> {
522private:
523 using NormalizedType = typename TypeToNormalizedType<ElementType>::type;
524
525public:
530 : PropertyView<ElementType, true>(),
531 _values{},
532 _size{0},
533 _arrayOffsets{},
534 _arrayOffsetType{PropertyComponentType::None},
535 _arrayOffsetTypeSize{0} {}
536
543 : PropertyView<ElementType, true>(status),
544 _values{},
545 _size{0},
546 _arrayOffsets{},
547 _arrayOffsetType{PropertyComponentType::None},
548 _arrayOffsetTypeSize{0} {
549 CESIUM_ASSERT(
551 "An empty property view should not be constructed with a valid status");
552 }
553
563 PropertyTablePropertyView(const ClassProperty& classProperty, int64_t size)
564 : PropertyView<ElementType, true>(classProperty),
565 _values{},
566 _size{0},
567 _arrayOffsets{},
568 _arrayOffsetType{PropertyComponentType::None},
569 _arrayOffsetTypeSize{0} {
570 if (this->_status != PropertyTablePropertyViewStatus::Valid) {
571 // Don't override the status / size if something is wrong with the class
572 // property's definition.
573 return;
574 }
575
576 if (!classProperty.defaultProperty) {
577 // This constructor should only be called if the class property *has* a
578 // default value. But in the case that it does not, this property view
579 // becomes invalid.
580 this->_status = PropertyTablePropertyViewStatus::ErrorNonexistentProperty;
581 return;
582 }
583
585 this->_size = size;
586 }
587
598 const PropertyTableProperty& property,
599 const ClassProperty& classProperty,
600 int64_t size,
601 std::span<const std::byte> values) noexcept
602 : PropertyView<ElementType, true>(classProperty, property),
603 _values{values},
604 _size{
605 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
606 _arrayOffsets{},
607 _arrayOffsetType{PropertyComponentType::None},
608 _arrayOffsetTypeSize{0} {}
609
622 const PropertyTableProperty& property,
623 const ClassProperty& classProperty,
624 int64_t size,
625 std::span<const std::byte> values,
626 std::span<const std::byte> arrayOffsets,
627 PropertyComponentType arrayOffsetType) noexcept
628 : PropertyView<ElementType, true>(classProperty, property),
629 _values{values},
630 _size{
631 this->_status == PropertyTablePropertyViewStatus::Valid ? size : 0},
632 _arrayOffsets{arrayOffsets},
633 _arrayOffsetType{arrayOffsetType},
634 _arrayOffsetTypeSize{getOffsetTypeSize(arrayOffsetType)} {}
635
651 std::optional<PropertyValueViewToCopy<NormalizedType>>
652 get(int64_t index) const noexcept {
653 if (this->_status ==
655 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
656 CESIUM_ASSERT(index < size() && "index must be less than size");
657
658 return propertyValueViewToCopy(this->defaultValue());
659 }
660
661 ElementType value = getRaw(index);
662 if (this->noData() && value == *(this->noData())) {
663 return propertyValueViewToCopy(this->defaultValue());
664 } else if constexpr (IsMetadataScalar<ElementType>::value) {
667 this->offset(),
668 this->scale());
669 } else if constexpr (IsMetadataVecN<ElementType>::value) {
670 constexpr glm::length_t N = ElementType::length();
671 using T = typename ElementType::value_type;
672 using NormalizedT = typename NormalizedType::value_type;
674 normalize<N, T>(value),
675 this->offset(),
676 this->scale());
677 } else if constexpr (IsMetadataMatN<ElementType>::value) {
678 constexpr glm::length_t N = ElementType::length();
679 using T = typename ElementType::value_type;
680 using NormalizedT = typename NormalizedType::value_type;
682 normalize<N, T>(value),
683 this->offset(),
684 this->scale());
685 } else if constexpr (IsMetadataArray<ElementType>::value) {
686 using ArrayElementType = typename MetadataArrayType<ElementType>::type;
689 value,
690 this->offset(),
691 this->scale());
692 } else if constexpr (IsMetadataVecN<ArrayElementType>::value) {
693 constexpr glm::length_t N = ArrayElementType::length();
694 using T = typename ArrayElementType::value_type;
696 value,
697 this->offset(),
698 this->scale());
699 } else if constexpr (IsMetadataMatN<ArrayElementType>::value) {
700 constexpr glm::length_t N = ArrayElementType::length();
701 using T = typename ArrayElementType::value_type;
703 value,
704 this->offset(),
705 this->scale());
706 }
707 }
708 }
709
720 ElementType getRaw(int64_t index) const noexcept {
721 CESIUM_ASSERT(
723 "Check the status() first to make sure view is valid");
724 CESIUM_ASSERT(
725 size() > 0 &&
726 "Check the size() of the view to make sure it's not empty");
727 CESIUM_ASSERT(index >= 0 && "index must be non-negative");
728 CESIUM_ASSERT(index < size() && "index must be less than size");
729
731 return getValue(index);
732 }
733
735 return getArrayValues<typename MetadataArrayType<ElementType>::type>(
736 index);
737 }
738 }
739
747 int64_t size() const noexcept {
748 return this->_status == PropertyTablePropertyViewStatus::Valid ? _size : 0;
749 }
750
751private:
752 ElementType getValue(int64_t index) const noexcept {
753 return reinterpret_cast<const ElementType*>(_values.data())[index];
754 }
755
756 template <typename T>
757 PropertyArrayView<T> getArrayValues(int64_t index) const noexcept {
758 size_t count = static_cast<size_t>(this->arrayCount());
759 // Handle fixed-length arrays
760 if (count > 0) {
761 size_t arraySize = count * sizeof(T);
762 const std::span<const std::byte> values(
763 _values.data() + index * arraySize,
764 arraySize);
765 return PropertyArrayView<T>{values};
766 }
767
768 // Handle variable-length arrays. The offsets are interpreted as array
769 // indices, not byte offsets, so they must be multiplied by sizeof(T)
770 const size_t currentOffset =
771 getOffsetFromOffsetsBuffer(index, _arrayOffsets, _arrayOffsetType) *
772 sizeof(T);
773 const size_t nextOffset =
774 getOffsetFromOffsetsBuffer(index + 1, _arrayOffsets, _arrayOffsetType) *
775 sizeof(T);
776 const std::span<const std::byte> values(
777 _values.data() + currentOffset,
778 nextOffset - currentOffset);
779 return PropertyArrayView<T>{values};
780 }
781
782 std::span<const std::byte> _values;
783 int64_t _size;
784
785 std::span<const std::byte> _arrayOffsets;
786 PropertyComponentType _arrayOffsetType;
787 int64_t _arrayOffsetTypeSize;
788};
789
790} // 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....