common/animation/blending_job.cc
// Normalizes output rotations. Quaternion length cannot be zero as opposed
// quaternions have been fixed up during blending passes.
// Translations and scales are already normalized because weights were
// pre-multiplied by the normalization ratio.

Normalizes output rotations. Quaternion length cannot be zero as opposed
quaternions have been fixed up during blending passes.
Translations and scales are already normalized because weights were
pre-multiplied by the normalization ratio.
Normalizes output rotations . Quaternion length cannot be zero as opposed quaternions have been fixed up during blending passes . Translations and scales are already normalized because weights were pre - multiplied by the normalization ratio .
void Normalize(ProcessArgs* _args)
			{
				assert(_args);
				if (_args->num_partial_passes == 0)
				{
					const math::SimdFloat4 ratio =
						math::simd_float4::Load1(1.f / _args->accumulated_weight);
					for (size_t i = 0; i < _args->num_soa_joints; ++i)
					{
						math::SoaTransform& dest = _args->job.output.begin[i];
						dest.rotation = NormalizeEst(dest.rotation);
						dest.translation = dest.translation * ratio;
						dest.scale = dest.scale * ratio;
					}
				}
				else
				{
					const math::SimdFloat4 one = math::simd_float4::one();
					for (size_t i = 0; i < _args->num_soa_joints; ++i)
					{
						const math::SimdFloat4 ratio = one / _args->accumulated_weights[i];
						math::SoaTransform& dest = _args->job.output.begin[i];
						dest.rotation = NormalizeEst(dest.rotation);
						dest.translation = dest.translation * ratio;
						dest.scale = dest.scale * ratio;
					}
				}
			}
void Normalize ( ProcessArgs * _args ) { assert ( _args ) ; if ( _args -> num_partial_passes == 0 ) { const math :: SimdFloat4 ratio = math :: simd_float4 :: Load1 ( 1.f / _args -> accumulated_weight ) ; for ( size_t i = 0 ; i < _args -> num_soa_joints ; ++ i ) { math :: SoaTransform & dest = _args -> job . output . begin [ i ] ; dest . rotation = NormalizeEst ( dest . rotation ) ; dest . translation = dest . translation * ratio ; dest . scale = dest . scale * ratio ; } } else { const math :: SimdFloat4 one = math :: simd_float4 :: one ( ) ; for ( size_t i = 0 ; i < _args -> num_soa_joints ; ++ i ) { const math :: SimdFloat4 ratio = one / _args -> accumulated_weights [ i ] ; math :: SoaTransform & dest = _args -> job . output . begin [ i ] ; dest . rotation = NormalizeEst ( dest . rotation ) ; dest . translation = dest . translation * ratio ; dest . scale = dest . scale * ratio ; } } }
Normalizes output rotations.
Normalizes output rotations .
// Normalization of a non-partial blending requires to apply the same
 // division to all joints.
 // Partial blending normalization requires to compute the divider per-joint.
