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
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
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
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 |