Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 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
                ));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 public static bool IsZ(this Vector3Item self)
 {
     return((self & Vector3Item.Z) == Vector3Item.Z);
 }
Ejemplo n.º 5
0
 public static bool IsY(this Vector3Item self)
 {
     return((self & Vector3Item.Y) == Vector3Item.Y);
 }
Ejemplo n.º 6
0
 public static bool IsX(this Vector3Item self)
 {
     return((self & Vector3Item.X) == Vector3Item.X);
 }