Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
accessor_utils.h File Reference
#include "momentum/common/exception.h"
#include "momentum/io/file_save_options.h"
#include <fx/gltf.h>
#include <gsl/span_ext>

Go to the source code of this file.

Namespaces

namespace  momentum

Functions

int32_t momentum::getComponentSize (const fx::gltf::Accessor::ComponentType &componentType)
int32_t momentum::getTypeSize (const fx::gltf::Accessor::Type &ty)
template<typename T>
std::vector< T > momentum::copyAccessorBuffer (const fx::gltf::Document &model, int32_t id)
template<typename T>
std::vector< T > momentum::copyAlignedAccessorBuffer (const fx::gltf::Document &model, int32_t id)
template<typename T>
void momentum::setAccessorType (fx::gltf::Accessor &)
template<typename T>
int32_t momentum::createAccessorBuffer (fx::gltf::Document &model, std::span< T > data, const bool align=false, const bool normalized=false)
template<>
void momentum::setAccessorType< const int32_t > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const float > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector2f > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector3f > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector4f > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector3b > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector3i > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector4s > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Vector4b > (fx::gltf::Accessor &accessor)
template<>
void momentum::setAccessorType< const Matrix4f > (fx::gltf::Accessor &accessor)
fx::gltf::Animation::Sampler::Type momentum::toGltfSamplerType (GltfAnimationInterpolation interpolation)
 Converts the save option to the GLTF sampler interpolation type.
template<typename T>
int32_t momentum::createSampler (fx::gltf::Document &model, fx::gltf::Animation &anim, std::span< T > data, const std::span< float > &timestamps, GltfAnimationInterpolation interpolation)
template<typename T>
int32_t momentum::createSampler (fx::gltf::Document &model, fx::gltf::Animation &anim, std::span< T > data, const int32_t timestampAccessor, GltfAnimationInterpolation interpolation)