Support quaternions in gltf::accessor_iterator
This commit is contained in:
parent
b04456066b
commit
b5117ca8b2
1 changed files with 13 additions and 0 deletions
|
|
@ -61,6 +61,19 @@ namespace psemek::gfx
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct accessor_traits<geom::quaternion<T>>
|
||||||
|
{
|
||||||
|
static constexpr bool is_floating_point = accessor_traits<T>::is_floating_point;
|
||||||
|
static constexpr std::size_t components = 4;
|
||||||
|
using component_type = T;
|
||||||
|
|
||||||
|
static auto pointer(geom::quaternion<T> & value)
|
||||||
|
{
|
||||||
|
return &value[0];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void safe_cast(gltf_asset::accessor::component_type_t type, bool normalized, T & dst, char const * src)
|
void safe_cast(gltf_asset::accessor::component_type_t type, bool normalized, T & dst, char const * src)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue