common/animation/skeleton_utils.cc
// Unpacks skeleton bind pose stored in soa format by the skeleton.

Unpacks skeleton bind pose stored in soa format by the skeleton.
Unpacks skeleton bind pose stored in soa format by the skeleton .
egal::math::Transform GetJointLocalBindPose(const Skeleton& _skeleton,
			int _joint)
		{
			assert(_joint >= 0 && _joint < _skeleton.num_joints() &&
				"Joint index out of range.");
			const egal::math::SoaTransform& soa_transform =
				_skeleton.bind_pose()[_joint / 4];
			egal::math::SimdFloat4 translations[4];
			egal::math::Transpose3x4(&soa_transform.translation.x, translations);
			egal::math::SimdFloat4 rotations[4];
			egal::math::Transpose4x4(&soa_transform.rotation.x, rotations);
			egal::math::SimdFloat4 scales[4];
			egal::math::Transpose3x4(&soa_transform.scale.x, scales);
			math::Transform bind_pose;
			const int offset = _joint % 4;
			egal::math::Store3PtrU(translations[offset], &bind_pose.translation.x);
			egal::math::StorePtrU(rotations[offset], &bind_pose.rotation.x);
			egal::math::Store3PtrU(scales[offset], &bind_pose.scale.x);
			return bind_pose;
		}
egal :: math :: Transform GetJointLocalBindPose ( const Skeleton & _skeleton , int _joint ) { assert ( _joint >= 0 && _joint < _skeleton . num_joints ( ) && " " ) ; const egal :: math :: SoaTransform & soa_transform = _skeleton . bind_pose ( ) [ _joint / 4 ] ; egal :: math :: SimdFloat4 translations [ 4 ] ; egal :: math :: Transpose3x4 ( & soa_transform . translation . x , translations ) ; egal :: math :: SimdFloat4 rotations [ 4 ] ; egal :: math :: Transpose4x4 ( & soa_transform . rotation . x , rotations ) ; egal :: math :: SimdFloat4 scales [ 4 ] ; egal :: math :: Transpose3x4 ( & soa_transform . scale . x , scales ) ; math :: Transform bind_pose ; const int offset = _joint % 4 ; egal :: math :: Store3PtrU ( translations [ offset ] , & bind_pose . translation . x ) ; egal :: math :: StorePtrU ( rotations [ offset ] , & bind_pose . rotation . x ) ; egal :: math :: Store3PtrU ( scales [ offset ] , & bind_pose . scale . x ) ; return bind_pose ; }
Unpacks skeleton bind pose stored in soa format by the skeleton.
Unpacks skeleton bind pose stored in soa format by the skeleton .
// Transpose SoA data to AoS.
 // Stores to the Transform object.
