![]() |
Lemmings
Remappable Gestures For Unity
|
Represents a context for computing a spatial relationship metric across a given list of lemming GameObjects and family structure. Supports Single, Couple, Throuple, and Group types with metric-specific logic. More...
Public Member Functions | |
| LemmingRelation (FamilyType family, List< LemmingReference > references, Enum metric, LemmingRelationSetting settings) | |
| Constructs a new relation context. This preffered method uses the full LemmingReference data which is more robust. | |
| LemmingRelation (FamilyType family, List< GameObject > gameObjects, Enum metric, LemmingRelationSetting settings) | |
| This constructor is for quick and dirty implementation in isolated cases. Developers might want to establish a Lemming Relationship for utility with non Lemming Game Objects. | |
| object | Evaluate (LemmingRelationSetting setting=null) |
| Evaluates the selected metric for the current family type and member set. Routes to an internal handler method based on FamilyType. Has an optional 'setting' parameter for passing optional settings. | |
| LemmingDatum | ToDatum () |
| Wraps the result of the evaluation into a LemmingDatum. Useful for integration into other systems. | |
Data Fields | |
| FamilyType | Family |
| Defines the structural type of the relationship (e.g., Single, Couple, etc). | |
| Enum | Metric |
| The metric enum specific to the FamilyType that describes the desired output. | |
Properties | |
| List< GameObject > | Members [get] |
| The GameObjects involved in the spatial relationship. Expected to be size-matched to the FamilyType. Pulls directly from References or is defined when the struct is initialized. | |
| List< LemmingReference > | References [get] |
| The Full Lemming Reference entry for getting reliable access. Uses 'Get' so that a LemmingRelation can be used with basic game objects. | |
| LemmingRelationSetting | Settings [get] |
| This contains settings for how to process various metrics. | |
Private Member Functions | |
| object | EvaluateSingle (SingleMetric metric, LemmingRelationSetting setting=null) |
| Computes a spatial metric using a single GameObject. | |
| Vector3 | SinglePosition (LemmingRelationSetting setting=null) |
| Get the Position datum for a single Lemming Relationship. | |
| float | SinglePositionFloat (LemmingRelationSetting setting=null) |
| Get the Position datum for a single Lemming Relationship where the value is for a single axis. | |
| Quaternion | SingleRotation (LemmingRelationSetting setting=null) |
| Get the rotation datum for a single Lemming Relationship. | |
| bool | SingleRotationBool (LemmingRelationSetting setting=null) |
| Returns a boolean based on whether the object is gazing at a tagged object, defined in the relationship proxy. | |
| Vector3 | SingleMovement (LemmingRelationSetting setting=null) |
| Get the movement vector of a single Lemming. Applies settings for relative reference, direction-only formatting. | |
| float | SingleMovementFloat (LemmingRelationSetting setting=null) |
| Get the float value of a single Lemming's movement. Supports magnitude, single axis, or relative-to-object comparison. | |
| bool | SingleTrigger (LemmingRelationSetting setting=null) |
| Evaluates whether the proxy for a Single Lemming relationship is currently triggered. | |
| object | EvaluateCouple (CoupleMetric metric, LemmingRelationSetting setting=null) |
| Computes a spatial metric for a pair of GameObjects. | |
| Vector3 | CouplePosition (LemmingRelationSetting setting=null) |
| Get the average world position between two Lemmings. | |
| float | CouplePositionFloat (LemmingRelationSetting setting=null) |
| Get the position along a selected axis or magnitude between two Lemmings. | |
| Quaternion | CoupleRotation (LemmingRelationSetting setting=null) |
| Get the Rotation of a Lemming Couple with multiple axis options. | |
| bool | CoupleRotationBool (LemmingRelationSetting setting=null) |
| Optional boolean output when rotation acts as a condition (e.g. gaze). | |
| float | CoupleDistance (LemmingRelationSetting setting=null) |
| The distance between the two Lemmings. | |
| Vector3 | CoupleMovement (LemmingRelationSetting setting=null) |
| Get the average velocity of a Lemming Couple. Applies optional settings: directionOnly, relativeToObject. | |
| float | CoupleMovementFloat (LemmingRelationSetting setting=null) |
| Get the float representation of a Couple's movement. Supports magnitude, axis extraction, and relative-to-each-other projection. | |
| Vector3 | CoupleDifference (LemmingRelationSetting setting=null) |
| Computes the difference vector from the first to the second member of a Couple. | |
| float | CoupleDifferenceFloat (LemmingRelationSetting setting=null) |
| Computes a scalar representing the magnitude or axis value of the difference vector between Couple members. | |
| bool | CoupleTrigger (LemmingRelationSetting setting=null) |
| Evaluates whether the proxy for a Couple relationship is currently triggered. | |
| object | EvaluateThrouple (ThroupleMetric metric, LemmingRelationSetting setting=null) |
| Computes a spatial metric across three GameObjects. | |
| Vector3 | ThrouplePosition (LemmingRelationSetting setting=null) |
| Get the average world position across all three Lemmings. | |
| float | ThrouplePositionFloat (LemmingRelationSetting setting=null) |
| Get the averaged position across all three Lemmings as a float, filtered by axis if set. | |
| Quaternion | ThroupleRotation (LemmingRelationSetting setting=null) |
| Get the Rotation of a Lemming Throuple with defined axis rules. | |
| bool | ThroupleRotationBool (LemmingRelationSetting setting=null) |
| Optional boolean output when throuple rotation is acting as a condition (e.g. gaze). | |
| Vector3 | ThroupleDistance (LemmingRelationSetting setting=null) |
| float | ThroupleDistanceFloat (LemmingRelationSetting setting=null) |
| Get a float representation of Throuple distance based on selected distance option. Supports unit scaling via DistanceUnit. | |
| Vector3 | ThroupleAngle (LemmingRelationSetting setting=null) |
| Computes the angles between the three members of the Throuple, giving the corner angles at each member. | |
| float | ThroupleAngleFloat (LemmingRelationSetting setting=null) |
| Computes a float value representing one of the angles in the Throuple, based on axis preference. | |
| float | ThroupleDensity (LemmingRelationSetting setting=null) |
| Compute the density of the Throuple based on average or total distance to center. | |
| Vector3 | ThroupleMovement (LemmingRelationSetting setting=null) |
| Get the average velocity of a Lemming Throuple. Applies optional settings: directionOnly, relativeToObject. | |
| float | ThroupleMovementFloat (LemmingRelationSetting setting=null) |
| Get a float representation of Throuple movement. Supports single axis filtering, magnitude, and center-relative projection. | |
| bool | ThroupleTrigger (LemmingRelationSetting setting=null) |
| Evaluates whether the proxy for a Throuple relationship is currently triggered. | |
| float | ThroupleRotationAroundAxis (LemmingRelationSetting setting=null) |
| Computes the signed angle (in degrees) between the Throuple's defined forward vector and a configurable reference direction, measured around an axis derived from the member layout. Useful for detecting twist, turn, or leaning in stable directional setups. | |
| Vector3 | ThroupleSize (LemmingRelationSetting setting=null) |
| Get the bounding box size or radius of the Throuple based on selected method. | |
| float | ThroupleSizeFloat (LemmingRelationSetting setting=null) |
| Get a scalar representing the size of the Throuple’s bounding box or max radius, filtered by a single axis. | |
| object | EvaluateGroup (GroupMetric metric, LemmingRelationSetting setting=null) |
| Computes a spatial metric across a group of four or more GameObjects. | |
| Vector3 | GroupPosition (LemmingRelationSetting setting=null) |
| Computes the average world position of all valid members in the group. | |
| float | GroupPositionFloat (LemmingRelationSetting setting=null) |
| Computes a float representation of the group’s average position, optionally filtered by axis. | |
| Quaternion | GroupRotation (LemmingRelationSetting setting=null) |
| Get the Rotation for a Lemming Group based on average velocity direction. | |
| bool | GroupRotationBool (LemmingRelationSetting setting=null) |
| Optional boolean output when group rotation is acting as a condition (e.g. gaze). | |
| float | GroupDensity (LemmingRelationSetting setting=null) |
| Compute the density of the group using average or total distance to center. | |
| Vector3 | GroupSize (LemmingRelationSetting setting=null) |
| Get the Group's bounding box size or radius based on method. | |
| float | GroupSizeFloat (LemmingRelationSetting setting=null) |
| Get the Group’s size as a float using bounding box or radius, filtered by axis. | |
| Vector3 | GroupMovement (LemmingRelationSetting setting=null) |
| Get the average movement velocity for a Lemming group, with support for direction-only or relative motion. | |
| float | GroupMovementFloat (LemmingRelationSetting setting=null) |
| Optional float override when group movement is reduced to a single axis or magnitude. Supports relative object comparisons. | |
| bool | GroupTrigger (LemmingRelationSetting setting=null) |
| Evaluates whether the proxy for a Group relationship is currently triggered. | |
| float | GroupRotationAroundAxis (LemmingRelationSetting setting=null) |
| Computes the signed angle (in degrees) between the Group's average velocity direction and a reference vector, measured around a specified axis. This is helpful for detecting group drift, heading deviation, or coordinated rotation in motion. | |
Represents a context for computing a spatial relationship metric across a given list of lemming GameObjects and family structure. Supports Single, Couple, Throuple, and Group types with metric-specific logic.
|
inline |
Constructs a new relation context. This preffered method uses the full LemmingReference data which is more robust.
| family | The type of relationship (e.g. Couple, Group). |
| references | The Lemming References involved in the relationship. |
| metric | The metric enum that defines what value to compute. |
|
inline |
This constructor is for quick and dirty implementation in isolated cases. Developers might want to establish a Lemming Relationship for utility with non Lemming Game Objects.
| family | The type of relationship (e.g. Couple, Group). |
| gameObjects | The GameObjects being mapped as a spatial relationship. |
| metric | The metric enum that defines what value to compute. |
|
inlineprivate |
Computes the difference vector from the first to the second member of a Couple.
| setting | Optional axis filter settings. |
|
inlineprivate |
Computes a scalar representing the magnitude or axis value of the difference vector between Couple members.
| setting | Optional single axis filtering. |
|
inlineprivate |
|
inlineprivate |
Get the average velocity of a Lemming Couple. Applies optional settings: directionOnly, relativeToObject.
| setting | Optional settings for axis filtering or reference adjustment. |
|
inlineprivate |
Get the float representation of a Couple's movement. Supports magnitude, axis extraction, and relative-to-each-other projection.
| setting | Optional settings for formatting or projection. |
|
inlineprivate |
Get the average world position between two Lemmings.
| setting | Optional settings (e.g. axis filtering) |
|
inlineprivate |
Get the position along a selected axis or magnitude between two Lemmings.
| setting | Optional settings (e.g. axis filtering) |
|
inlineprivate |
Get the Rotation of a Lemming Couple with multiple axis options.
| setting | Optional settings for customizing the rotation axis and behavior. |
|
inlineprivate |
Optional boolean output when rotation acts as a condition (e.g. gaze).
| setting | Setting must include a proxy reference and optionally a confidence threshold. |
|
inlineprivate |
Evaluates whether the proxy for a Couple relationship is currently triggered.
| setting | Must include a proxy reference. |
|
inline |
Evaluates the selected metric for the current family type and member set. Routes to an internal handler method based on FamilyType. Has an optional 'setting' parameter for passing optional settings.
|
inlineprivate |
Computes a spatial metric for a pair of GameObjects.
| metric | The couple-specific metric to evaluate. |
| setting | This can later hold settings if required |
|
inlineprivate |
Computes a spatial metric across a group of four or more GameObjects.
| metric | The group metric to compute. |
| setting | Optional Settings for evaluation |
|
inlineprivate |
Computes a spatial metric using a single GameObject.
| metric | The single-object metric to compute. |
| setting | This can later hold settings if required |
|
inlineprivate |
Computes a spatial metric across three GameObjects.
| metric | The throuple-specific metric to evaluate. |
| setting | Optional settings for evaluation |
|
inlineprivate |
Compute the density of the group using average or total distance to center.
| setting | Optional settings including method and unit. |
|
inlineprivate |
Get the average movement velocity for a Lemming group, with support for direction-only or relative motion.
| setting | Optional settings controlling normalization and relative calculation. |
|
inlineprivate |
Optional float override when group movement is reduced to a single axis or magnitude. Supports relative object comparisons.
| setting | Optional settings: single axis, magnitudeOnly, and relative reference. |
|
inlineprivate |
Computes the average world position of all valid members in the group.
| setting | Optional settings (not currently used) |
|
inlineprivate |
Computes a float representation of the group’s average position, optionally filtered by axis.
| setting | Optional settings for axis filtering |
|
inlineprivate |
Get the Rotation for a Lemming Group based on average velocity direction.
| setting | Optional setting with invert toggle. |
|
inlineprivate |
Computes the signed angle (in degrees) between the Group's average velocity direction and a reference vector, measured around a specified axis. This is helpful for detecting group drift, heading deviation, or coordinated rotation in motion.
| setting | Settings control the rotation axis, reference vector selection, and optional inversion. |
|
inlineprivate |
Optional boolean output when group rotation is acting as a condition (e.g. gaze).
| setting | Setting must include a proxy reference and optionally a confidence threshold. |
|
inlineprivate |
Get the Group's bounding box size or radius based on method.
| setting | Optional settings. |
|
inlineprivate |
Get the Group’s size as a float using bounding box or radius, filtered by axis.
| setting | Axis filtering and size method options. |
|
inlineprivate |
Evaluates whether the proxy for a Group relationship is currently triggered.
| setting | Must include a proxy reference. |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Returns a boolean based on whether the object is gazing at a tagged object, defined in the relationship proxy.
| setting | This hold the proxy and the threshold for establishing gaze |
|
inlineprivate |
Evaluates whether the proxy for a Single Lemming relationship is currently triggered.
| setting | Must include a proxy reference. |
|
inlineprivate |
Computes the angles between the three members of the Throuple, giving the corner angles at each member.
| setting | Optional axis filtering or distance unit scaling. |
|
inlineprivate |
Computes a float value representing one of the angles in the Throuple, based on axis preference.
| setting | Optional single axis selection. Defaults to average if none. |
|
inlineprivate |
Compute the density of the Throuple based on average or total distance to center.
| setting | Optional distance method and unit conversion. |
|
inlineprivate |
Get a float representation of Throuple distance based on selected distance option. Supports unit scaling via DistanceUnit.
| setting | Optional setting to choose pair type and unit format. |
|
inlineprivate |
Get the average velocity of a Lemming Throuple. Applies optional settings: directionOnly, relativeToObject.
| setting | Optional settings for formatting or reference adjustment. |
|
inlineprivate |
Get a float representation of Throuple movement. Supports single axis filtering, magnitude, and center-relative projection.
| setting | Optional settings for float formatting or group-relative behavior. |
|
inlineprivate |
Get the average world position across all three Lemmings.
| setting | Optional settings (not currently used) |
|
inlineprivate |
Get the averaged position across all three Lemmings as a float, filtered by axis if set.
| setting | Optional settings for axis filtering |
|
inlineprivate |
Get the Rotation of a Lemming Throuple with defined axis rules.
| setting | Settings for controlling axis direction and style. |
|
inlineprivate |
Computes the signed angle (in degrees) between the Throuple's defined forward vector and a configurable reference direction, measured around an axis derived from the member layout. Useful for detecting twist, turn, or leaning in stable directional setups.
| setting | Settings define how the primary and reference axes are selected and whether inversion is applied. |
|
inlineprivate |
Optional boolean output when throuple rotation is acting as a condition (e.g. gaze).
| setting | Setting must include a proxy reference and optionally a confidence threshold. |
|
inlineprivate |
Get the bounding box size or radius of the Throuple based on selected method.
| setting | Optional settings: size method and axis filtering. |
|
inlineprivate |
Get a scalar representing the size of the Throuple’s bounding box or max radius, filtered by a single axis.
| setting | Optional settings to determine method and axis. |
|
inlineprivate |
Evaluates whether the proxy for a Throuple relationship is currently triggered.
| setting | Must include a proxy reference. |
|
inline |
Wraps the result of the evaluation into a LemmingDatum. Useful for integration into other systems.