Exemplo n.º 1
0
        public static MeshAttributeCLASSES makeDouble4(double[][] arr)
        {
            uint length_ = (uint)arr.Length;


            MeshAttributeCLASSES created = new MeshAttributeCLASSES(AbstractMeshAttribute.EnumDataType.DOUBLE4, length_);

            created.pointer = Marshal.AllocHGlobal(SIZEOFDOUBLE * 4 * (int)length_);

            // copy to unmanaged memory
            for (int i = 0; i < arr.Length; i++)
            {
                Trace.Assert(arr[i].Length == 4);

                IntPtr indexedPtr = IntPtr.Add(created.pointer, SIZEOFDOUBLE * i * 4);
                Marshal.Copy(arr[i], 0, indexedPtr, 4);
            }

            return(created);
        }
Exemplo n.º 2
0
 public Double4Accessor(MeshAttributeCLASSES parent)
 {
     this.parent = parent;
 }