cesium-native 0.48.0
Loading...
Searching...
No Matches
Accessor.h
1#pragma once
2
3#include <CesiumGltf/AccessorSpec.h>
4#include <CesiumGltf/Library.h>
5
6#include <cstdint>
7
8namespace CesiumGltf {
9struct Model;
10
12struct 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
37 Accessor() = default;
38
49 int8_t computeNumberOfComponents() const noexcept;
50
63 int8_t computeByteSizeOfComponent() const noexcept;
64
77 int64_t computeBytesPerVertex() const noexcept;
78
95 int64_t computeByteStride(const CesiumGltf::Model& model) const noexcept;
96};
97} // namespace CesiumGltf
Classes for working with glTF models.
AccessorSpec()=default
This class is not meant to be instantiated directly. Use Accessor instead.
std::string type
Specifies if the accessor's elements are scalars, vectors, or matrices.
int32_t componentType
The datatype of the accessor's components.
int64_t computeBytesPerVertex() const noexcept
Computes the total number of bytes for this accessor in each vertex.
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.
int64_t computeByteStride(const CesiumGltf::Model &model) const noexcept
Computes this accessor's stride.
static int8_t computeByteSizeOfComponent(int32_t componentType) noexcept
Computes the number of bytes for a given accessor component type.
This class is not meant to be instantiated directly. Use Model instead.
Definition Model.h:14