Struct SamplingTime | Kinematica | 0.8.0-preview
docs.unity.cn
    Show / Hide Table of Contents

    Struct SamplingTime

    A sampling time is used to uniquely identfy a sub-sampled animation frame.

    Namespace: Unity.Kinematica
    Syntax
    [Data("Sampling Time", DataFlags.SelfInputOutput)]
    public struct SamplingTime : IDebugObject, IDebugDrawable
    Remarks

    A sampling time is a construct that is similar in nature to a time index. It serves exactly the same purpose but carries additional information that enables sub-sampling.

    Fields

    theta

    Denotes a blend weight between 0 and 1 that control sub-frame sampling.

    Declaration
    public float theta
    Field Value
    Type Description
    Single
    Remarks

    The blend weight 'theta" is used for sub-frame sampling. A value of 0 conceptionally refers to the animation frame that the time index refers to. A value of 1 refers to its immediate next neighboring frame.

    timeIndex

    Denotes the time index this sampling time refers to.

    Declaration
    public TimeIndex timeIndex
    Field Value
    Type Description
    TimeIndex

    Properties

    debugIdentifier

    Declaration
    public DebugIdentifier debugIdentifier { get; set; }
    Property Value
    Type Description
    DebugIdentifier
    Implements
    IDebugObject.debugIdentifier

    frameIndex

    Denotes the frame index relative to the beginning of the segment that this sampling time refers to.

    Declaration
    public int frameIndex { get; }
    Property Value
    Type Description
    Int32

    Invalid

    Invalid sampling time.

    Declaration
    public static SamplingTime Invalid { get; }
    Property Value
    Type Description
    SamplingTime

    IsValid

    Determines if the given sampling time is valid or not.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    True if the sampling time is valid; false otherwise.

    segmentIndex

    Denotes the segment this sampling time refers to.

    Declaration
    public int segmentIndex { get; }
    Property Value
    Type Description
    Int32

    Methods

    Create(TimeIndex, Single)

    Create a sampling time from a time index and a theta value.

    Declaration
    public static SamplingTime Create(TimeIndex timeIndex, float theta = 0F)
    Parameters
    Type Name Description
    TimeIndex timeIndex

    The time index that the sampling time should refer to.

    Single theta

    The theta value that the sampling time should refer to.

    Returns
    Type Description
    SamplingTime
    See Also
    TimeIndex

    Draw(Camera, ref MotionSynthesizer, DebugMemory, SamplingTime, ref DebugDrawOptions)

    Declaration
    public void Draw(Camera camera, ref MotionSynthesizer synthesizer, DebugMemory debugMemory, SamplingTime debugSamplingTime, ref DebugDrawOptions options)
    Parameters
    Type Name Description
    Camera camera
    MotionSynthesizer synthesizer
    DebugMemory debugMemory
    SamplingTime debugSamplingTime
    DebugDrawOptions options
    Implements
    IDebugDrawable.Draw(Camera, ref MotionSynthesizer, DebugMemory, SamplingTime, ref DebugDrawOptions)

    See Also

    TimeIndex
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Monday, August 3, 2020