Struct QueryTraitExpression | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct QueryTraitExpression

    Trait expressions represent semantic filtering of animation poses that are based on tag traits.

    Namespace: Unity.Kinematica
    Syntax
    public struct QueryTraitExpression : IDisposable
    Remarks

    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. The portion of a query expression that filters based on tag traits is a trait expression and can be introduced at any point in the expression. It is possible to switch from a trait expression to a marker expression, but not visa versa.

    Methods

    After<T>()

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

    And<T>(T)

    Appends a tag trait constraint to the existing tag trait expression.

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

    An "and" clause matches all intervals from the motion library that contain the trait passed as argument and any constraint that has been previously specified as part of the tag trait expression.

    synthesizer.Query.Where(
        Locomotion.Default).And(Idle.Default));

    See Also
    Query

    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

    Dispose()

    Disposes the underlying constructed filter expression.

    Declaration
    public void Dispose()

    Except<T>(T)

    Appends a tag trait constraint to the existing tag trait expression.

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

    An "except" clause matches all intervals from the motion library that does not contain the trait passed as argument.

    synthesizer.Query.Where(
        Locomotion.Default).Except(Idle.Default));

    See Also
    Query

    Or<T>(T)

    Appends a tag trait constraint to the existing tag trait expression.

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

    An "or" clause matches all intervals from the motion library that contain the trait passed as argument or any constraint that has been previously specified as part of the tag trait expression.

    synthesizer.Query.Where(
        Locomotion.Default).Or(Locomotion.Crouching));

    See Also
    Query

    Operators

    Implicit(QueryTraitExpression to QueryResult)

    Implicit conversion from a marker expression to a pose sequence.

    Declaration
    public static implicit operator QueryResult(QueryTraitExpression expression)
    Parameters
    Type Name Description
    QueryTraitExpression expression
    Returns
    Type Description
    QueryResult

    See Also

    Query
    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