/// <summary> /// Initializes a new instance of the <see cref="Vector8ui"/> using the specified vector and values. /// </summary> /// <param name="value">A vector containing the values with which to initialize the first 3 components</param> /// <param name="v3">Value for the V3 component of the vector.</param> /// <param name="v4">Value for the V4 component of the vector.</param> /// <param name="v5">Value for the V5 component of the vector.</param> /// <param name="v6">Value for the V6 component of the vector.</param> /// <param name="v7">Value for the V7 component of the vector.</param> public Vector8ui(Vector3ui value, uint v3, uint v4, uint v5, uint v6, uint v7, uint v8, uint v9, uint v10) { V0 = value.X; V1 = value.Y; V2 = value.Z; V3 = v3; V4 = v4; V5 = v5; V6 = v6; V7 = v7; }
/// <summary>Read an array of <c>Vector3ui</c> values.</summary> public static Vector3ui[] ReadArrayVector3ui(this BinaryReader reader, int count) { Vector3ui[] array = new Vector3ui[count]; reader.ReadArray(array, 0, count); return array; }
/// <summary>Read a <see cref="Vector3ui"/>.</summary> public static void ReadVector3ui(this BinaryReader reader , out Vector3ui result) { result.X = reader.ReadUInt32(); result.Y = reader.ReadUInt32(); result.Z = reader.ReadUInt32(); return; }
public void Set(ref Vector3ui value) { unsafe { fixed(Vector3ui* pointer = &value) Set3(1, (uint*)pointer); } }
public void Set(Vector3ui value) { unsafe { Set3(1, (uint*)&value); } }
static unsafe void FromUInt32(int first, int count, IList<Vector3ui> data) { for(int index = 0; index < count; index++)data[first + index] = new Vector3ui((uint)( *((System.UInt32*)list.ToPointer() + (index + 0) * 4 * 3) ), (uint)( *((System.UInt32*)list.ToPointer() + (index + 1) * 4 * 3) ), (uint)( *((System.UInt32*)list.ToPointer() + (index + 2) * 4 * 3) )); }
static unsafe void FromBoolean(int first, int count, IList<Vector3ui> data) { for(int index = 0; index < count; index++)data[first + index] = new Vector3ui((uint)( Marshal.ReadInt32(list, (index + 0) * 4 * 3 * 4) != 0 ? 1 : 0 ), (uint)( Marshal.ReadInt32(list, (index + 1) * 4 * 3 * 4) != 0 ? 1 : 0 ), (uint)( Marshal.ReadInt32(list, (index + 2) * 4 * 3 * 4) != 0 ? 1 : 0 )); }