Show / Hide Table of Contents

Class InteractionTargetCacheComparer

A custom comparer that ignores differences in HitPos, HitNormal and UncachedParams.

Inheritance
System.Object
InteractionTargetCacheComparer
Implements
System.Collections.Generic.IEqualityComparer<InteractionTarget>
Namespace: Eco.Shared.SharedTypes
Assembly: Eco.Shared.dll
Syntax
public class InteractionTargetCacheComparer : Object, IEqualityComparer<InteractionTarget>

Constructors

InteractionTargetCacheComparer()

Declaration
public InteractionTargetCacheComparer()

Methods

Equals(InteractionTarget, InteractionTarget)

Declaration
public bool Equals(InteractionTarget x, InteractionTarget y)
Parameters
Type Name Description
InteractionTarget x
InteractionTarget y
Returns
Type Description
System.Boolean

EqualsTest(InteractionTarget, InteractionTarget, Boolean)

Excluded HitPos, HitNormal, and uncahced params, so targets can be considered same even if pointer is pointing at a different spot

Declaration
public static bool EqualsTest(InteractionTarget x, InteractionTarget y, bool ignoreNormals)
Parameters
Type Name Description
InteractionTarget x
InteractionTarget y
System.Boolean ignoreNormals
Returns
Type Description
System.Boolean

GetHashCode(InteractionTarget)

Excluded hitpos and hitnormal from hashcode generation, hit information is not relevant to target comparison

Declaration
public int GetHashCode(InteractionTarget target)
Parameters
Type Name Description
InteractionTarget target
Returns
Type Description
System.Int32

GetHashCodeStatic(InteractionTarget)

Declaration
public static int GetHashCodeStatic(InteractionTarget target)
Parameters
Type Name Description
InteractionTarget target
Returns
Type Description
System.Int32

Implements

System.Collections.Generic.IEqualityComparer<>

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾