using UnityEngine; namespace Cinemachine { /// Interface for raw signal provider public interface ISignalSource6D { /// /// Returns the length on seconds of the signal. /// Returns 0 for signals of indeterminate length. /// float SignalDuration { get; } /// Get the signal value at a given time relative to signal start /// Time since signal start. Always >= 0 /// output for position component of the signal /// output for rotation component of the signal. Use Quaternion.identity if none. void GetSignal(float timeSinceSignalStart, out Vector3 pos, out Quaternion rot); } /// /// This is an asset that defines a 6D signal that can be retrieved in a random-access fashion. /// This is used by the Cinemachine Impulse module. /// [DocumentationSorting(DocumentationSortingAttribute.Level.API)] public abstract class SignalSourceAsset : ScriptableObject, ISignalSource6D { /// /// Returns the length on seconds of the signal. /// Returns 0 for signals of indeterminate length. /// public abstract float SignalDuration { get; } /// Get the signal value at a given time relative to signal start /// Time since signal start. Always >= 0 /// output for position component of the signal /// output for rotation component of the signal. Use Quaternion.identity if none. public abstract void GetSignal( float timeSinceSignalStart, out Vector3 pos, out Quaternion rot); } }