public override F.IResult Test(object value) { if (value is P.Actor) { P.Actor actor = value as P.Actor; P.Vector translate = actor.Translate; if (translate != null) { switch (_Coordinate) { case Coordinate.X: return(_filter.Test(translate.X)); case Coordinate.Y: return(_filter.Test(translate.Y)); case Coordinate.Z: return(_filter.Test(translate.Z)); } } } return(F.EMPTY_RESULT); }
// Check vector for being identity public static bool IsIdentity(this P.Vector val) { return(val.X.IsNear(1.0f) && val.Y.IsNear(1.0f) && val.Z.IsNear(1.0f)); }
internal bool _v_VectorP2(Property obj, float lowerbounds = float.NaN) { Savegame.Properties.Vector v = obj as Savegame.Properties.Vector; return(_v_3(obj, v.X, v.Y, v.Z, lowerbounds)); }