Fix merge

This commit is contained in:
SirLynix 2022-06-05 18:51:21 +02:00 committed by Jérôme Leclercq
parent b8ea79c40e
commit d60fce169a
2 changed files with 3 additions and 22 deletions

View File

@ -1031,16 +1031,6 @@ namespace Nz
return MakeTransform(-(invRot * translation), invRot); return MakeTransform(-(invRot * translation), invRot);
} }
template<typename T>
Matrix4<T>& Matrix4<T>::MakeTransformInverse(const Vector3<T>& translation, const Quaternion<T>& rotation, const Vector3<T>& scale)
{
// A view matrix must apply an inverse transformation of the 'world' matrix
Quaternion<T> invRot = rotation.GetConjugate(); // Inverse of the rotation
Vector3<T> invScale = T(1.0) / scale;
return MakeTransform(-(invScale * (invRot * translation)), invRot, invScale);
}
/*! /*!
* \brief Makes the matrix an inverse transform matrix (aka view matrix) * \brief Makes the matrix an inverse transform matrix (aka view matrix)
* \return A reference to this matrix * \return A reference to this matrix
@ -1706,15 +1696,6 @@ namespace Nz
return mat; return mat;
} }
template<typename T>
Matrix4<T> Matrix4<T>::TransformInverse(const Vector3<T>& translation, const Quaternion<T>& rotation, const Vector3<T>& scale)
{
Matrix4 mat;
mat.MakeTransformInverse(translation, rotation, scale);
return mat;
}
/*! /*!
* \brief Shorthand for the 'view' matrix * \brief Shorthand for the 'view' matrix
* \return A Matrix4 which is the 'view matrix' * \return A Matrix4 which is the 'view matrix'

View File

@ -151,14 +151,14 @@ namespace Nz
options.defaultValues options.defaultValues
}); });
FieldOffsets skeletalOffsets(StructLayout::Std140); nzsl::FieldOffsets skeletalOffsets(nzsl::StructLayout::Std140);
skeletalOffsets.AddMatrixArray(StructFieldType::Float1, 4, 4, true, 100); skeletalOffsets.AddMatrixArray(nzsl::StructFieldType::Float1, 4, 4, true, 100);
settings.sharedUniformBlocks.push_back({ settings.sharedUniformBlocks.push_back({
6, 6,
"SkeletalData", "SkeletalData",
{}, {},
ShaderStageType::Vertex nzsl::ShaderStageType::Vertex
}); });
// Common data // Common data