Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/fastgltf/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,24 +358,24 @@ namespace fastgltf {
constexpr std::string_view KHR_materials_specular = "KHR_materials_specular";
constexpr std::string_view KHR_materials_transmission = "KHR_materials_transmission";
constexpr std::string_view KHR_materials_unlit = "KHR_materials_unlit";
constexpr std::string_view KHR_materials_variants = "KHR_materials_variants";
constexpr std::string_view KHR_materials_variants = "KHR_materials_variants";
constexpr std::string_view KHR_materials_volume = "KHR_materials_volume";
constexpr std::string_view KHR_mesh_quantization = "KHR_mesh_quantization";
constexpr std::string_view KHR_node_visibility = "KHR_node_visibility";
constexpr std::string_view KHR_node_selectability = "KHR_node_selectability";
constexpr std::string_view KHR_node_hoverability = "KHR_node_hoverability";
constexpr std::string_view KHR_texture_basisu = "KHR_texture_basisu";
constexpr std::string_view KHR_texture_transform = "KHR_texture_transform";
constexpr std::string_view MSFT_packing_normalRoughnessMetallic = "MSFT_packing_normalRoughnessMetallic";
constexpr std::string_view MSFT_packing_occlusionRoughnessMetallic = "MSFT_packing_occlusionRoughnessMetallic";
constexpr std::string_view MSFT_packing_normalRoughnessMetallic = "MSFT_packing_normalRoughnessMetallic";
constexpr std::string_view MSFT_packing_occlusionRoughnessMetallic = "MSFT_packing_occlusionRoughnessMetallic";
constexpr std::string_view MSFT_texture_dds = "MSFT_texture_dds";

#if FASTGLTF_ENABLE_DEPRECATED_EXT
constexpr std::string_view KHR_materials_pbrSpecularGlossiness = "KHR_materials_pbrSpecularGlossiness";
#endif

#if FASTGLTF_ENABLE_KHR_IMPLICIT_SHAPES
constexpr std::string_view KHR_implicit_shapes = "KHR_implicit_shapes";
constexpr std::string_view KHR_implicit_shapes = "KHR_implicit_shapes";
#endif

#if FASTGLTF_ENABLE_KHR_PHYSICS_RIGID_BODIES
Expand Down
12 changes: 6 additions & 6 deletions include/fastgltf/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,14 +804,14 @@ namespace fastgltf::math {
[[nodiscard]] auto determinant(const mat<T, 4, 4>& m) noexcept {
const auto d = m.data();
T a00 = d[0], a10 = d[4], a20 = d[8], a30 = d[12],
a01 = d[1], a11 = d[5], a21 = d[9], a31 = d[13],
a02 = d[2], a12 = d[6], a22 = d[10], a32 = d[14],
a03 = d[3], a13 = d[7], a23 = d[11], a33 = d[15];
a01 = d[1], a11 = d[5], a21 = d[9], a31 = d[13],
a02 = d[2], a12 = d[6], a22 = d[10], a32 = d[14],
a03 = d[3], a13 = d[7], a23 = d[11], a33 = d[15];

T b00 = a00 * a11 - a01 * a10, b01 = a00 * a12 - a02 * a10, b02 = a00 * a13 - a03 * a10,
b03 = a01 * a12 - a02 * a11, b04 = a01 * a13 - a03 * a11, b05 = a02 * a13 - a03 * a12,
b06 = a20 * a31 - a21 * a30, b07 = a20 * a32 - a22 * a30, b08 = a20 * a33 - a23 * a30,
b09 = a21 * a32 - a22 * a31, b10 = a21 * a33 - a23 * a31, b11 = a22 * a33 - a23 * a32;
b03 = a01 * a12 - a02 * a11, b04 = a01 * a13 - a03 * a11, b05 = a02 * a13 - a03 * a12,
b06 = a20 * a31 - a21 * a30, b07 = a20 * a32 - a22 * a30, b08 = a20 * a33 - a23 * a30,
b09 = a21 * a32 - a22 * a31, b10 = a21 * a33 - a23 * a31, b11 = a22 * a33 - a23 * a32;

return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
}
Expand Down
12 changes: 6 additions & 6 deletions include/fastgltf/tools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ class AccessorIterator {
if (accessor->accessor.sparse.has_value()) {
// Get the first sparse index.
nextSparseIndex = internal::getAccessorElementAt<std::uint32_t>(accessor->indexComponentType,
&accessor->indicesBytes[accessor->indexStride * sparseIdx]);
&accessor->indicesBytes[accessor->indexStride * sparseIdx]);
}
}

Expand Down Expand Up @@ -531,22 +531,22 @@ class AccessorIterator {
if (idx == nextSparseIndex) {
// Get the sparse value for this index
auto value = internal::getAccessorElementAt<ElementType>(accessor->componentType,
&accessor->valuesBytes[accessor->valueStride * sparseIdx],
accessor->accessor.normalized);
&accessor->valuesBytes[accessor->valueStride * sparseIdx],
accessor->accessor.normalized);

// Find the next sparse index.
++sparseIdx;
if (sparseIdx < accessor->sparseCount) {
nextSparseIndex = internal::getAccessorElementAt<std::uint32_t>(accessor->indexComponentType,
&accessor->indicesBytes[accessor->indexStride * sparseIdx]);
&accessor->indicesBytes[accessor->indexStride * sparseIdx]);
}
return value;
}
}

return internal::getAccessorElementAt<ElementType>(accessor->componentType,
&accessor->bufferBytes[idx * accessor->stride],
accessor->accessor.normalized);
&accessor->bufferBytes[idx * accessor->stride],
accessor->accessor.normalized);
}
};

Expand Down
Loading