Ejemplo n.º 1
0
        /// <summary>
        /// construct as a copy of the list
        /// </summary>
        /// <param name="list"></param>
        public VectorOfFloat(List <float> list)
        {
            var arr = list.ToArray();

            _ptr = Invoke.std_vector_float_ctor_count(arr.Length);

            var dptr = (float *)Data;

            for (var i = 0; i < arr.Length; i++)
            {
                dptr[i] = arr[i];
            }
        }
Ejemplo n.º 2
0
        public IEnumerable <KeyValuePair <uint, uint> > EqualRange(uint key)
        {
            using (var begin = new Iterator())
                using (var end = new Iterator())
                {
                    Invoke.std_multimap_uintanduint_equal_range(_ptr, key, begin, end);

                    for (; !begin.Equals(end); begin.Increment())
                    {
                        yield return(new KeyValuePair <uint, uint>(begin.Key, begin.Value));
                    }
                }
        }
        /// <summary>
        /// construct as a copy of the list
        /// </summary>
        /// <param name="list"></param>
        public VectorOfXYZ(List <PointXYZ> list)
        {
            var arr = list.ToArray();

            _ptr = Invoke.std_vector_xyz_ctor_count(arr.Length);

            var dptr = (PointXYZ *)Data;

            for (var i = 0; i < arr.Length; i++)
            {
                dptr[i] = arr[i];
            }
        }
        /// <summary>
        /// construct as a copy of the list
        /// </summary>
        /// <param name="list"></param>
        public VectorOfNormal(List <Normal> list)
        {
            var arr = list.ToArray();

            _ptr = Invoke.std_vector_normal_ctor_count(arr.Length);

            var dptr = (Normal *)Data;

            for (var i = 0; i < arr.Length; i++)
            {
                dptr[i] = arr[i];
            }
        }
        /// <summary>
        /// construct as a copy of the list
        /// </summary>
        /// <param name="list"></param>
        public VectorOfByte(List <byte> list)
        {
            var arr = list.ToArray();

            _ptr = Invoke.std_vector_byte_ctor_count(arr.Length);

            var dptr = (byte *)Data;

            for (var i = 0; i < arr.Length; i++)
            {
                dptr[i] = arr[i];
            }
        }
 public override void Insert(int index, PointXYZ item)
 => Invoke.std_vector_xyz_insert(_ptr, (IntPtr)index, item);
 public override void Add(PointXYZ value)
 => Invoke.std_vector_xyz_add(_ptr, value);
 public override void Add(uint value)
 => Invoke.std_vector_uint_add(_ptr, value);
 public override void Clear() => Invoke.std_vector_normal_clear(_ptr);
Ejemplo n.º 10
0
 public VectorOfByte()
 {
     _ptr = Invoke.std_vector_byte_ctor();
 }
Ejemplo n.º 11
0
 public override void Clear() => Invoke.std_vector_byte_clear(_ptr);
Ejemplo n.º 12
0
 public override void Insert(int index, float item)
 => Invoke.std_vector_float_insert(_ptr, (IntPtr)index, item);
Ejemplo n.º 13
0
 public override void Clear() => Invoke.std_vector_float_clear(_ptr);
 public override void At(int idx, ref Normal value)
 {
     Invoke.std_vector_normal_at(_ptr, (UIntPtr)idx, ref value);
 }
 public VectorOfNormal(int count)
 {
     _ptr = Invoke.std_vector_normal_ctor_count(count);
 }
 public VectorOfNormal()
 {
     _ptr = Invoke.std_vector_normal_ctor();
 }
 public override void Insert(int index, Normal item)
 => Invoke.std_vector_normal_insert(_ptr, (IntPtr)index, item);
 public VectorOfXYZ()
 {
     _ptr = Invoke.std_vector_xyz_ctor();
 }
 public VectorOfXYZ(int count)
 {
     _ptr = Invoke.std_vector_xyz_ctor_count(count);
 }
Ejemplo n.º 20
0
 public VectorOfFloat()
 {
     _ptr = Invoke.std_vector_float_ctor();
 }
 public override void At(int idx, ref PointXYZ value)
 {
     Invoke.std_vector_xyz_at(_ptr, (UIntPtr)idx, ref value);
 }
Ejemplo n.º 22
0
 public VectorOfFloat(int count)
 {
     _ptr = Invoke.std_vector_float_ctor_count(count);
 }
Ejemplo n.º 23
0
 public override void Insert(int index, byte item)
 => Invoke.std_vector_byte_insert(_ptr, (IntPtr)index, item);
Ejemplo n.º 24
0
 public override void Resize(int size)
 => Invoke.std_vector_byte_resize(_ptr, size);
Ejemplo n.º 25
0
 public VectorOfByte(int count)
 {
     _ptr = Invoke.std_vector_byte_ctor_count(count);
 }
 public override void Add(Normal value)
 => Invoke.std_vector_normal_add(_ptr, value);
Ejemplo n.º 27
0
 public override void At(int idx, ref byte value)
 {
     Invoke.std_vector_byte_at(_ptr, (UIntPtr)idx, ref value);
 }
Ejemplo n.º 28
0
 public override void At(int idx, ref float value)
 {
     Invoke.std_vector_float_at(_ptr, (UIntPtr)idx, ref value);
 }
Ejemplo n.º 29
0
 public override void Add(byte value)
 => Invoke.std_vector_byte_add(_ptr, value);
Ejemplo n.º 30
0
 public override void Add(float value)
 => Invoke.std_vector_float_add(_ptr, value);