public static Int32Value Create(Bool3 b) { switch (b) { case Bool3.False: return Zero; case Bool3.True: return One; default: return CreateUnknownBool(); } }
public static IntBox OffsetSize(Int3 min, Int3 size, Bool3 maxIsInclusive) { return(new IntBox( new Range(min.X, min.X + size.X, maxIsInclusive.X), new Range(min.Y, min.Y + size.Y, maxIsInclusive.Y), new Range(min.Z, min.Z + size.Z, maxIsInclusive.Z) )); }
public static IntBox FromMinAndMax(Int3 min, Int3 max, Bool3 maxIsInclusive) { return(new IntBox( new Range(min.X, max.X, maxIsInclusive.X), new Range(min.Y, max.Y, maxIsInclusive.Y), new Range(min.Z, max.Z, maxIsInclusive.Z) )); }
bool EmulateBranch(int stackArgs, Bool3 cond) { if (cond == Bool3.Unknown) { return(false); } return(EmulateBranch(stackArgs, cond == Bool3.True)); }
int EmulateBranch(int stackArgs, Bool3 cond, Instruction instrTrue, Instruction instrFalse) { if (cond == Bool3.Unknown) { return(-1); } Instruction instr = cond == Bool3.True ? instrTrue : instrFalse; return(methodToInline.Body.Instructions.IndexOf(instr)); }
static Int32Value create(Bool3 b) { switch (b) { case Bool3.False: return(Int32Value.zero); case Bool3.True: return(Int32Value.one); default: return(Int32Value.createUnknownBool()); } }
public override bool Equals(object other) { if (other == null || GetType() != other.GetType()) { return(false); } Bool3 o = (Bool3)other; return((this == o).allTrue); }
static Int32Value Create(Bool3 b) { switch (b) { case Bool3.False: return(Zero); case Bool3.True: return(One); default: return(CreateUnknownBool()); } }
/// <summary> /// Converts a specified Bool3 value to string. /// </summary> /// <param name="val">The value.</param> /// <returns>"false" for False, "true" for True, "" for Any.</returns> public static string Bool3ToString(Bool3 val) { switch (val) { case Bool3.False: return("false"); case Bool3.True: return("true"); default: return(""); } }
public Bool3 DrawElement(WindowSettings window, DrawInfo info, int childCount, string name, float width, Texture tex, string tooltip = "") { Bool3 clicked = new Bool3(); if (childCount > 0) { GUILayout.Space(-1); // GUI.color = GUI.backgroundColor; clicked.v2 = GUILayout.Button(Helper.GetGUIContent(string.Empty, tooltip), GUILayout.Width(21), GUILayout.Height(21)); Rect rect = GUILayoutUtility.GetLastRect(); rect.x += (info.foldout ? 4 : 5); rect.y += (info.foldout ? 7 : 6); rect.width = rect.height = 8; GUI.DrawTexture(rect, info.foldout ? texArrowUnfolded : texArrowFolded); // GUI.color = GetColor(Color.white); GUILayout.Space(-4); } else { GUILayout.Space(5); DrawDot(GUI.backgroundColor, tooltip, tex); GUILayout.Space(5); // GUILayout.Toggle(true, Helper.MyGUIContent(string.Empty, tooltip), GUILayout.Width(25)); } GUILayout.Space(2); if (width == -1) { GUILayout.Label(name); } else { GUILayout.Label(name, GUILayout.Width(width)); } clicked.v3 = clicked.v1 || clicked.v2; return(clicked); }
public Bool3 DrawElement(WindowSettings window, DrawInfo info, int childCount, string text = "", Texture image = null, string tooltip = "", bool isActive = true, int prefix = 0) { Bool3 clicked = new Bool3(); GUI.color = isActive ? Color.white : new Color(0.25f, 0.25f, 0.25f, 1); GUILayout.BeginHorizontal(); if (prefix != 0) { GUILayout.Space(prefix); } if (childCount > 0 || childCount == -1) { if (windowData.showChildCount.Value && childCount > 0) { clicked.v2 = GUILayout.Button((Helper.GetGUIContent(childCount.ToString(), info.foldout ? texArrowUnfolded : texArrowFolded)), GUILayout.Width(55), GUILayout.Height(21)); } else { clicked.v2 = GUILayout.Button(Helper.GetGUIContent(string.Empty, info.foldout ? texArrowUnfolded : texArrowFolded), GUILayout.Width(25), GUILayout.Height(21)); } } else { GUILayout.Label(string.Empty, GUILayout.Width(windowData.showChildCount.Value ? 55 : 25), GUILayout.Height(21)); } clicked.v1 = GUILayout.Button(Helper.GetGUIContent(text, image, tooltip), GUILayout.Height(21)); GUILayout.EndHorizontal(); GUI.color = Color.white; clicked.v3 = clicked.v1 || clicked.v2; return(clicked); }
public static Vector3 ReplaceValues(Vector3 current, Vector3 replace, Bool3 mask) { return ReplaceValues(current, replace, mask.x, mask.y, mask.z); }
public bool Equals(Bool3 other) { return(this.X == other.X && this.Y == other.Y && this.Z == other.Z); }
bool emulateBranch(int stackArgs, Bool3 cond) { if (cond == Bool3.Unknown) return false; return emulateBranch(stackArgs, cond == Bool3.True); }
public Bool3Property(string name, Bool3 val) { Name = name; Value = val; }
static Int32Value create(Bool3 b) { switch (b) { case Bool3.False: return zero; case Bool3.True: return one; default: return createUnknownBool(); } }
public static Box CenterExtent(Vec3 center, float extent, Bool3 maxIsInclusive) { return(FromMinAndMax(center - extent, center + extent, maxIsInclusive)); }
static Int32Value create(Bool3 b) { switch (b) { case Bool3.False: return new Int32Value(0); case Bool3.True: return new Int32Value(1); default: return Int32Value.createUnknownBool(); } }
bool EmulateBranch(int stackArgs, Bool3 cond) { if (cond == Bool3.Unknown) return false; return EmulateBranch(stackArgs, cond == Bool3.True); }
public Bool3Property(Bool3 val) { Value = val; }
int EmulateBranch(int stackArgs, Bool3 cond, Instruction instrTrue, Instruction instrFalse) { if (cond == Bool3.Unknown) return -1; Instruction instr = cond == Bool3.True ? instrTrue : instrFalse; return methodToInline.Body.Instructions.IndexOf(instr); }
public void SetValue(Bool3 value) { Value = value; }
public Bool3Property() { Value = new Bool3(); }