Represents a three dimensional mathematical vector (signed integers).
| 11 | /// Represents a three dimensional mathematical vector (signed integers). |
| 12 | /// </summary> |
| 13 | [Serializable] |
| 14 | #if FLAX_EDITOR |
| 15 | [System.ComponentModel.TypeConverter(typeof(TypeConverters.Int3Converter))] |
| 16 | #endif |
| 17 | partial struct Int3 : IEquatable<Int3>, IFormattable, Json.ICustomValueEquals |
| 18 | { |
| 19 | private static readonly string _formatString = "X:{0} Y:{1} Z:{2}"; |
| 20 | |
| 21 | /// <summary> |
| 22 | /// The size of the <see cref="Int3" /> type, in bytes. |
| 23 | /// </summary> |
| 24 | public static readonly int SizeInBytes = Marshal.SizeOf(typeof(Int3)); |
| 25 | |
| 26 | /// <summary> |
| 27 | /// A <see cref="Int3" /> with all of its components set to zero. |
| 28 | /// </summary> |
| 29 | public static readonly Int3 Zero; |
| 30 | |
| 31 | /// <summary> |
| 32 | /// The X unit <see cref="Int3" /> (1, 0, 0). |
| 33 | /// </summary> |
| 34 | public static readonly Int3 UnitX = new Int3(1, 0, 0); |
| 35 | |
| 36 | /// <summary> |
| 37 | /// The Y unit <see cref="Int3" /> (0, 1, 0). |
| 38 | /// </summary> |
| 39 | public static readonly Int3 UnitY = new Int3(0, 1, 0); |
| 40 | |
| 41 | /// <summary> |
| 42 | /// The Z unit <see cref="Int3" /> (0, 0, 1). |
| 43 | /// </summary> |
| 44 | public static readonly Int3 UnitZ = new Int3(0, 0, 1); |
| 45 | |
| 46 | /// <summary> |
| 47 | /// A <see cref="Int3" /> with all of its components set to one. |
| 48 | /// </summary> |
| 49 | public static readonly Int3 One = new Int3(1, 1, 1); |
| 50 | |
| 51 | /// <summary> |
| 52 | /// A <see cref="Int3" /> with all components equal to <see cref="int.MinValue"/>. |
| 53 | /// </summary> |
| 54 | public static readonly Int3 Minimum = new Int3(int.MinValue); |
| 55 | |
| 56 | /// <summary> |
| 57 | /// A <see cref="Int3" /> with all components equal to <see cref="int.MaxValue"/>. |
| 58 | /// </summary> |
| 59 | public static readonly Int3 Maximum = new Int3(int.MaxValue); |
| 60 | |
| 61 | /// <summary> |
| 62 | /// Initializes a new instance of the <see cref="Int3" /> struct. |
| 63 | /// </summary> |
| 64 | /// <param name="value">The value that will be assigned to all components.</param> |
| 65 | public Int3(int value) |
| 66 | { |
| 67 | X = value; |
| 68 | Y = value; |
| 69 | Z = value; |
| 70 | } |
no test coverage detected