private void RecalculateSRTMatrixCache()
{
if (!_isSRTMatrix)
{
throw new InvalidOperationException("Attempted to update SRT matrix cache for non-SRT matrix.");
}
if (_isCachedSRTLocalMatrixUpToDate)
{
throw new InvalidOperationException("Attempted to update SRT matrix cache when it's already up-to-date. This would incur a performance penalty if the operation continued.");
}
_cachedSRTLocalMatrix =
Matrix.CreateScale(_srtLocalScale) *
Matrix.CreateFromQuaternion(_srtLocalRotation) *
Matrix.CreateTranslation(_srtLocalPosition);
_isCachedSRTLocalMatrixUpToDate = true;
}