cesium-native  0.41.0
Accessor.h
1 #pragma once
2 
3 #include "CesiumGltf/AccessorSpec.h"
4 #include "CesiumGltf/Library.h"
5 
6 #include <cstdint>
7 
8 namespace CesiumGltf {
9 struct Model;
10 
12 struct CESIUMGLTF_API Accessor final : public AccessorSpec {
23  static int8_t computeNumberOfComponents(const std::string& type) noexcept;
24 
35  static int8_t computeByteSizeOfComponent(int32_t componentType) noexcept;
36 
47  int8_t computeNumberOfComponents() const noexcept;
48 
61  int8_t computeByteSizeOfComponent() const noexcept;
62 
75  int64_t computeBytesPerVertex() const noexcept;
76 
93  int64_t computeByteStride(const CesiumGltf::Model& model) const noexcept;
94 };
95 } // namespace CesiumGltf
Classes for working with glTF models.
A typed view into a buffer view that contains raw binary data.
Definition: AccessorSpec.h:18
A typed view into a buffer view that contains raw binary data.
Definition: Accessor.h:12
static int8_t computeNumberOfComponents(const std::string &type) noexcept
Computes the number of components for a given accessor type.
int8_t computeNumberOfComponents() const noexcept
Computes the number of components for this accessor.
static int8_t computeByteSizeOfComponent(int32_t componentType) noexcept
Computes the number of bytes for a given accessor component type.
The root object for a glTF asset.
Definition: Model.h:14