Class TestMultiRelation.SimilarBoundsSizeRelation
Implements
Inherited Members
Namespace: Unity.MARS.Tests
Assembly: Unity.MARS.dll
Syntax
[Serializable]
public class TestMultiRelation.SimilarBoundsSizeRelation : SubRelation, IRelation<Vector2>, IRelation, IRelationBase, IConditionBase, IRequiresTraits<Vector2>, IRequiresTraits
Fields
MaxRatio
Declaration
[Tooltip("the maximum ratio of bounds size from child 1 to child 2")]
public float MaxRatio
Field Value
Type | Description |
---|---|
float |
MinRatio
Declaration
[Tooltip("the minimum ratio of bounds size from child 1 to child 2")]
public float MinRatio
Field Value
Type | Description |
---|---|
float |
Properties
child1TraitName
The trait to test against for the first child
Declaration
public string child1TraitName { get; }
Property Value
Type | Description |
---|---|
string |
child2TraitName
The trait to test against for the second child
Declaration
public string child2TraitName { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetRequiredTraits()
Get the TraitRequirements that are required by this object
Declaration
public TraitRequirement[] GetRequiredTraits()
Returns
Type | Description |
---|---|
TraitRequirement[] | The required traits |
RateDataMatch(ref Vector2, ref Vector2)
Compares the given trait data to the filter function
Declaration
public float RateDataMatch(ref Vector2 child1Data, ref Vector2 child2Data)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | child1Data | The data being filtered against for the first child |
Vector2 | child2Data | The data being filtered against for the second child |
Returns
Type | Description |
---|---|
float | A number from 0 to 1 indicating how well a set of data matches |