using UnityEngine; namespace Passer { /// /// The Cerebellum interface defines the interface to control /// public interface ICerebellum { /// /// Retrieve the target for the joint /// /// The identification of the joint /// ICerebellumTarget GetTarget(sbyte jointId); /// /// Retrieve the joint /// /// The identification of the joint /// ICerebellumJoint GetJoint(sbyte jointId); } /// /// A joint target which is used to calculate how the joints need to move /// public interface ICerebellumTarget { /// /// The position of the target in world space /// /// The confidence will be set to 1 (maximum) Vector3 position { get; set; } /// /// The position of the target in the local space of the parent joint /// /// The confidence will be set to 1 (maximum) Vector3 localPosition { get; set; } /// /// The orientation of the target in world space /// /// The confidence will be set to 1 (maximum) Quaternion orientation { get; set; } /// /// The orientation fo the target in the local space of the parent joint /// /// The confidence will be set to 1 (maximum) Quaternion localOrientation { get; set; } /// /// Set the position of the target in world space with a confidence value /// /// The position of the target in world space /// The confidence of the position in the range 0..1 void SetPosition(Vector3 position, float confidence); /// /// Set the orientation of the target in world space with a confidence value /// /// The orientation of the target in world space /// The confidence of the orientation in the range 0..1 void SetOrientation(Quaternion orientation, float confidence); } /// /// The joint itself /// public interface ICerebellumJoint { /// /// The position of the joint in world space /// Vector3 position { set; } /// /// The position of the joint in the local space of the parent joint /// Vector3 localPosition { get; } /// /// The orientation of the joint in world space /// Quaternion orientation { get; set; } /// /// The orientation of the joint in the local space of the parent joint /// Quaternion localOrientation { get; set; } } }