using System;
using UnityEngine.Serialization;
namespace UnityEngine.Perception.GroundTruth
{
///
/// A definition of a keypoint (joint).
///
[Serializable]
public class KeypointDefinition
{
///
/// The name of the keypoint
///
public string label;
///
/// Does this keypoint map directly to a
///
public bool associateToRig = true;
///
/// The associated of the rig
///
public HumanBodyBones rigLabel = HumanBodyBones.Head;
///
/// The color of the keypoint in the visualization
///
public Color color = Color.blue;
}
///
/// A skeletal connection between two joints.
///
[Serializable]
public class SkeletonDefinition
{
///
/// The first joint
///
public int joint1;
///
/// The second joint
///
public int joint2;
///
/// The color of the skeleton in the visualization
///
public Color color = Color.blue;
}
///
/// Template used to define the keypoints of a humanoid asset.
///
[CreateAssetMenu(fileName = "KeypointTemplate", menuName = "Perception/Keypoint Template", order = 2)]
public class KeypointTemplate : ScriptableObject
{
///
/// The of the template
///
public string templateID = Guid.NewGuid().ToString();
///
/// The name of the template
///
public string templateName;
///
/// Texture to use for the visualization of the joint.
///
public Texture2D jointTexture;
///
/// Texture to use for the visualization of the skeletal connection.
///
public Texture2D skeletonTexture;
///
/// Array of for the template.
///
[FormerlySerializedAs("keyPoints")]
public KeypointDefinition[] keypoints;
///
/// Array of the for the template.
///
public SkeletonDefinition[] skeleton;
}
}