using Unity.Entities; using Unity.Mathematics; using UnityEngine; using Hash128 = Unity.Entities.Hash128; //////////////////////////////////////////////////////////////////////////////////////// namespace Rukhanka { public struct RigBoneInfo { #if RUKHANKA_DEBUG_INFO public BlobString name; #endif public uint hash; public int parentBoneIndex; public BoneTransform refPose; public AvatarMaskBodyPart humanBodyPart; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public struct HumanRotationData { public float3 minMuscleAngles, maxMuscleAngles; public quaternion preRot, postRot; public float3 sign; public static HumanRotationData Identity() { var rv = new HumanRotationData() { sign = 1, postRot = quaternion.identity, preRot = quaternion.identity, maxMuscleAngles = 0, minMuscleAngles = 0 }; return rv; } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public struct HumanData { public BlobArray humanRotData; public BlobArray mirroredBoneIndices; public BlobArray humanBoneToSkeletonBoneIndices; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public struct RigDefinitionBlob: GenericAssetBlob { #if RUKHANKA_DEBUG_INFO public BlobString name; public string Name() => name.ToString(); public float bakingTime; public float BakingTime() => bakingTime; #endif public Hash128 hash; public Hash128 Hash() => hash; public BlobArray bones; public BlobPtr humanData; public int rootBoneIndex; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public struct BoneRemapTableBlob { public BlobArray remapIndices; } }