public static Vector3Item MakeVector3Item(bool X, bool Y, bool Z) { Vector3Item v = Vector3Item.None; if (X) { v |= Vector3Item.X; } if (Y) { v |= Vector3Item.Y; } if (Z) { v |= Vector3Item.Z; } return(v); }
public static Vector3 ApproachingLimitCap(this Vector3 self, Vector3 other, Vector3 inc, Vector3Item item) { return(new Vector3( item.IsX() ? ApproachingLimitCap(self.x, other.x, inc.x) : self.x, item.IsY() ? ApproachingLimitCap(self.y, other.y, inc.y) : self.y, item.IsZ() ? ApproachingLimitCap(self.z, other.z, inc.z) : self.z )); }
public static Vector3 Merge(this Vector3 self, Vector3 other, Vector3Item item) { return(new Vector3(item.IsX() ? other.x : self.x, item.IsY() ? other.y : self.y, item.IsZ() ? other.z : self.z)); }
public static bool IsZ(this Vector3Item self) { return((self & Vector3Item.Z) == Vector3Item.Z); }
public static bool IsY(this Vector3Item self) { return((self & Vector3Item.Y) == Vector3Item.Y); }
public static bool IsX(this Vector3Item self) { return((self & Vector3Item.X) == Vector3Item.X); }