Struct Query | Kinematica | 0.5.0-preview.1
docs.unity.cn
    Show / Hide Table of Contents

    Struct Query

    Entry point for semantic filtering based query language.

    Namespace: Unity.Kinematica
    Syntax
    public struct Query
    Remarks

    Methods in this struct serve as an entry point for query language based constructs. A query performs semantic filtering of the motion library. The result of this filtering process is always a pose sequence, which represents the poses that match the criterias used as constraints.

    Constraints can be stacked by adding multiple constraints to the filter expression. An expression always starts with zero or more filters based on tag traits and ends with zero or more filters that are based on marker traits.

    Task creation methods offered by the motion synthesizer typically consume pose sequences directly and subsequently select a single pose out of the input sequence based on certain criterias, like matching a given reference pose and/or matching a given input trajectory.

    var result = synthesizer.Query.Where(
        Locomotion.Default).And(Idle.Default));

    Methods

    After<T>()

    Declaration
    public QueryMarkerExpression After<T>()
        where T : struct
    Returns
    Type Description
    QueryMarkerExpression
    Type Parameters
    Name Description
    T

    At<T>()

    Declaration
    public QueryMarkerExpression At<T>()
        where T : struct
    Returns
    Type Description
    QueryMarkerExpression
    Type Parameters
    Name Description
    T

    Before<T>()

    Declaration
    public QueryMarkerExpression Before<T>()
        where T : struct
    Returns
    Type Description
    QueryMarkerExpression
    Type Parameters
    Name Description
    T

    Where<T>(T)

    Introduces a tag trait expression that selects based on a "where" clause.

    Declaration
    public QueryTraitExpression Where<T>(T value)
        where T : struct
    Parameters
    Type Name Description
    T value

    The trait values to be used as constraint.

    Returns
    Type Description
    QueryTraitExpression
    Type Parameters
    Name Description
    T
    Remarks

    A "where" clause matches all intervals from the motion library that contain the trait passed as argument.

    synthesizer.Query.Where(Climbing.Create(Climbing.Type.Wall));

    See Also
    Query

    See Also

    Query
    Push(QueryResult)
    Binary.Interval
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX