Struct TaskReference | Kinematica | 0.7.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Struct TaskReference

    Self sufficient task reference that can be used to access the task data and create children to that task without needing to pass the

    MotionSynthesizer
    as argument

    Namespace: Unity.Kinematica
    Syntax
    public struct TaskReference

    Methods

    Action()

    Creates a new action task as a child of the current task.

    Declaration
    public TaskReference Action()
    Returns
    Type Description
    TaskReference

    reference to the newly created action task.

    Condition()

    Creates a new condition task as a child of the current task.

    Declaration
    public TaskReference Condition()
    Returns
    Type Description
    TaskReference

    reference to the newly created condition task.

    Create(MemoryIdentifier, MemoryRef<MotionSynthesizer>)

    Declaration
    public static TaskReference Create(MemoryIdentifier taskIdentifier, MemoryRef<MotionSynthesizer> synthesizer)
    Parameters
    Type Name Description
    MemoryIdentifier taskIdentifier
    MemoryRef<MotionSynthesizer> synthesizer
    Returns
    Type Description
    TaskReference

    CreateChildData<T>(T)

    Declaration
    public Identifier<T> CreateChildData<T>(T data)
        where T : struct
    Parameters
    Type Name Description
    T data
    Returns
    Type Description
    Identifier<T>
    Type Parameters
    Name Description
    T

    CreateChildDataArray<T>(MemoryArray<T>)

    Declaration
    public Identifier<T> CreateChildDataArray<T>(MemoryArray<T> data)
        where T : struct
    Parameters
    Type Name Description
    MemoryArray<T> data
    Returns
    Type Description
    Identifier<T>
    Type Parameters
    Name Description
    T

    CreateChildTask<T>(T)

    Declaration
    public TaskReference CreateChildTask<T>(T task)
        where T : struct, GenericTask<T>
    Parameters
    Type Name Description
    T task
    Returns
    Type Description
    TaskReference
    Type Parameters
    Name Description
    T

    CurrentPose()

    Creates a new current pose task as a child of current task.

    Declaration
    public TaskReference CurrentPose()
    Returns
    Type Description
    TaskReference

    Reference to the newly created current pose task.

    See Also
    CurrentPoseTask

    GetAs<T>()

    Return the task object associated to this reference

    Declaration
    public T GetAs<T>()
        where T : struct, Task
    Returns
    Type Description
    T

    task object associated to this reference

    Type Parameters
    Name Description
    T

    Type of Task

    GetChildByType<T>()

    Searches for a child node based on its type.

    Declaration
    public T GetChildByType<T>()
        where T : struct
    Returns
    Type Description
    T

    Reference of the result.

    Type Parameters
    Name Description
    T
    Remarks

    Retrieves a reference to a data type that is a direct or indirect child of current task

    MatchFragment(Identifier<PoseSequence>)

    Creates a new match fragment task as a child of current task.

    Declaration
    public TaskReference MatchFragment(Identifier<PoseSequence> sequences)
    Parameters
    Type Name Description
    Identifier<PoseSequence> sequences

    The pose sequence that the match fragment task receives as input.

    Returns
    Type Description
    TaskReference

    Reference to the newly created match fragment task.

    See Also
    MatchFragmentTask

    MatchFragment(Identifier<PoseSequence>, Identifier<SamplingTime>, Identifier<Trajectory>, Single)

    Creates a new match fragment task as a child of current task.

    Declaration
    public TaskReference MatchFragment(Identifier<PoseSequence> sequences, Identifier<SamplingTime> samplingTime, Identifier<Trajectory> trajectory, float threshold = 0F)
    Parameters
    Type Name Description
    Identifier<PoseSequence> sequences

    The pose sequence that the match fragment task receives as input.

    Identifier<SamplingTime> samplingTime

    Reference animation pose that the match fragment task will receive as input.

    Identifier<Trajectory> trajectory

    The desired future trajectory that the match fragment task will receive as input.

    Single threshold

    The threshold that the match fragment task will receive as input.

    Returns
    Type Description
    TaskReference

    Reference to the newly created match fragment task.

    See Also
    MatchFragmentTask

    MatchPose(QueryResult, Single)

    Creates a new push task as a child of current task.

    Declaration
    public TaskReference MatchPose(QueryResult result, float threshold)
    Parameters
    Type Name Description
    QueryResult result

    Pose sequence that will be passed to the implicitely created match fragment operation.

    Single threshold

    Threshold that will be passed to the implicitely created match fragment operation.

    Returns
    Type Description
    TaskReference

    Reference to the newly created play at time task.

    Remarks

    This is a convenience method that implicitely creates a match fragment task for the query result that is passed as argument. The match fragment task will be set up such that it selects the animation pose that is most similar to the current pose of the synthesizer.

    See Also
    PlayAtTimeTask

    MatchPoseAndTrajectory(QueryResult, Identifier<Trajectory>)

    Creates a new push task as a child of current task.

    Declaration
    public TaskReference MatchPoseAndTrajectory(QueryResult result, Identifier<Trajectory> trajectory)
    Parameters
    Type Name Description
    QueryResult result

    Pose sequence that will be passed to the implicitely created match fragment operation.

    Identifier<Trajectory> trajectory

    Trajectory that will be passed to the implicitely created match fragment operation.

    Returns
    Type Description
    TaskReference

    Reference to the newly created play at time task.

    Remarks

    This is a convenience method that implicitely creates a match fragment task for the query result that is passed as argument. The match fragment task will be set up such that it selects the animation pose that is most similar to the current pose of the synthesizer and the desired trajectory that is passed as argument.

    See Also
    Unity.Kinematica.PushTask

    Navigation()

    Creates a new navigation task as child of current task

    Declaration
    public TaskReference Navigation()
    Returns
    Type Description
    TaskReference

    Reference of navigation task

    Parallel()

    Creates a new parallel task as a child of the current task.

    Declaration
    public TaskReference Parallel()
    Returns
    Type Description
    TaskReference

    reference to the newly created parallel task.

    PlayAtTime(Identifier<TimeIndex>)

    Creates a new play at time task as a child of current task.

    Declaration
    public TaskReference PlayAtTime(Identifier<TimeIndex> samplingTime)
    Parameters
    Type Name Description
    Identifier<TimeIndex> samplingTime

    The sampling time that the push task receives as input.

    Returns
    Type Description
    TaskReference

    Reference to the newly created play at time task.

    See Also
    PlayAtTimeTask

    PlayAtTime(TimeIndex)

    Creates a new play at time task as a child of current task.

    Declaration
    public TaskReference PlayAtTime(TimeIndex samplingTime)
    Parameters
    Type Name Description
    TimeIndex samplingTime

    The sampling time that the push task receives as input.

    Returns
    Type Description
    TaskReference

    Reference to the newly created play at time task.

    See Also
    PlayAtTimeTask

    PlayFirstSequence(QueryResult)

    Creates a new play at time task as a child of current task.

    Declaration
    public TaskReference PlayFirstSequence(QueryResult result)
    Parameters
    Type Name Description
    QueryResult result

    Pose sequence that will be passed to the implicitely created match fragment operation.

    Returns
    Type Description
    TaskReference

    Reference to the newly created play at time task.

    Remarks

    This is a convenience method that implicitely creates a match fragment task for the query result that is passed as argument. Since in this case the match fragment task will not receive any constraints it will simply select the first pose of the query result. This method allows to push the first pose of a query result to the motion synthesizer.

    See Also
    PlayAtTimeTask

    QueryResult(QueryResult)

    Creates a new pose sequence.

    Declaration
    public Identifier<PoseSequence> QueryResult(QueryResult result)
    Parameters
    Type Name Description
    QueryResult result

    Query result that is to be used as initial value of the pose sequence.

    Returns
    Type Description
    Identifier<PoseSequence>

    reference to the newly created pose sequence.

    Remarks

    This method allows the creation of a pose sequence that can be fed into a match fragment task. The pose sequence will be initialized based on the query result passed as argument.

    See Also
    Query
    MatchFragmentTask

    SamplingTime()

    Creates a new sampling time.

    Declaration
    public Identifier<SamplingTime> SamplingTime()
    Returns
    Type Description
    Identifier<SamplingTime>

    reference to the newly created sampling time.

    Remarks

    The value of the newly created sampling time will be set to invalid.

    SamplingTime(SamplingTime)

    Creates a new sampling time.

    Declaration
    public Identifier<SamplingTime> SamplingTime(SamplingTime samplingTime)
    Parameters
    Type Name Description
    SamplingTime samplingTime

    Sampling time value that is to be used as initial value.

    Returns
    Type Description
    Identifier<SamplingTime>

    reference to the newly created sampling time.

    Remarks

    The value of the newly created sampling time will be set to the sampling time passed as argument.

    Selector()

    Creates a new selector task as a child of the current task.

    Declaration
    public TaskReference Selector()
    Returns
    Type Description
    TaskReference

    reference to the newly created selector task.

    Sequence(Boolean, Boolean)

    Creates a new sequence task as a child of the current task.

    Declaration
    public TaskReference Sequence(bool loop = false, bool resetWhenNotExecuted = true)
    Parameters
    Type Name Description
    Boolean loop

    If false, once the sequence has finished executing all its children, it will do nothing and just return success. If true, sequence will reexecute all its children tasks indefinitely.

    Boolean resetWhenNotExecuted

    If true, and if the sequence isn't executed during one task graph pass, next time the sequence will be executed again, it will restart execution from its first child.

    Returns
    Type Description
    TaskReference

    reference to the newly created sequence task.

    TimeIndex()

    Creates a new time index.

    Declaration
    public Identifier<TimeIndex> TimeIndex()
    Returns
    Type Description
    Identifier<TimeIndex>

    reference to the newly created time index.

    Remarks

    The value of the newly created time index will be set to invalid.

    TimeIndex(TimeIndex)

    Creates a new time index.

    Declaration
    public Identifier<TimeIndex> TimeIndex(TimeIndex timeIndex)
    Parameters
    Type Name Description
    TimeIndex timeIndex

    Time index value that is to be used as initial value.

    Returns
    Type Description
    Identifier<TimeIndex>

    reference to the newly created time index.

    Remarks

    The value of the newly created time index will be set to the time index passed as argument.

    Timer(Single)

    Creates a new timer task as a child of current task.

    Declaration
    public TaskReference Timer(float timeInSeconds = 0F)
    Parameters
    Type Name Description
    Single timeInSeconds

    Time in seconds that will be used as initial value for the timer task.

    Returns
    Type Description
    TaskReference

    Reference to the newly created timer task.

    Trajectory()

    Creates a new trajectory.

    Declaration
    public Identifier<Trajectory> Trajectory()
    Returns
    Type Description
    Identifier<Trajectory>

    reference to the newly created trajectory.

    Remarks

    This method allows the creation of a trajectory that can be used for any task that requires a reference to a trajectory.

    TrajectoryHeuristic(Identifier<TimeIndex>, Identifier<Trajectory>)

    Creates a new trajectory heuristic task as a child of current task.

    Declaration
    public TaskReference TrajectoryHeuristic(Identifier<TimeIndex> candidate, Identifier<Trajectory> trajectory)
    Parameters
    Type Name Description
    Identifier<TimeIndex> candidate

    The candidate time index that the trajectory heuristic task receives as input.

    Identifier<Trajectory> trajectory

    The trajectory that the trajectory heuristic task receives as input.

    Returns
    Type Description
    TaskReference

    Reference to the newly created trajectory heuristic task.

    See Also
    TrajectoryHeuristicTask

    TrajectoryPrediction()

    Creates a new trajectory prediction task as a child of current task.

    Declaration
    public TaskReference TrajectoryPrediction()
    Returns
    Type Description
    TaskReference

    Reference to the newly created trajectory prediction task.

    Operators

    Implicit(TaskReference to MemoryIdentifier)

    Declaration
    public static implicit operator MemoryIdentifier(TaskReference taskReference)
    Parameters
    Type Name Description
    TaskReference taskReference
    Returns
    Type Description
    MemoryIdentifier
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023