Inheritance: ICollection, IList, IEnumerable, ICloneable
Ejemplo n.º 1
0
 /// <summary>
 ///		Creates a synchronized (thread-safe) wrapper for a
 ///     <c>QuaternionCollection</c> instance.
 /// </summary>
 /// <returns>
 ///     An <c>QuaternionCollection</c> wrapper that is synchronized (thread-safe).
 /// </returns>
 public static QuaternionCollection Synchronized(QuaternionCollection list)
 {
     if (list == null)
     {
         throw new ArgumentNullException("list");
     }
     return(new SyncQuaternionCollection(list));
 }
Ejemplo n.º 2
0
 /// <summary>
 ///		Creates a read-only wrapper for a
 ///     <c>QuaternionCollection</c> instance.
 /// </summary>
 /// <returns>
 ///     An <c>QuaternionCollection</c> wrapper that is read-only.
 /// </returns>
 public static QuaternionCollection ReadOnly(QuaternionCollection list)
 {
     if (list == null)
     {
         throw new ArgumentNullException("list");
     }
     return(new ReadOnlyQuaternionCollection(list));
 }
Ejemplo n.º 3
0
        /// <summary>
        ///		Creates a shallow copy of the <see cref="QuaternionCollection"/>.
        /// </summary>
        public virtual object Clone()
        {
            QuaternionCollection newColl = new QuaternionCollection(m_count);

            Array.Copy(m_array, 0, newColl.m_array, 0, m_count);
            newColl.m_count   = m_count;
            newColl.m_version = m_version;

            return(newColl);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///		Creates a shallow copy of the <see cref="QuaternionCollection"/>.
        /// </summary>
        public virtual object Clone()
        {
            var newColl = new QuaternionCollection(this.m_count);

            Array.Copy(this.m_array, 0, newColl.m_array, 0, this.m_count);
            newColl.m_count   = this.m_count;
            newColl.m_version = this.m_version;

            return(newColl);
        }
Ejemplo n.º 5
0
        /// <summary>
        ///		Adds the elements of another <c>QuaternionCollection</c> to the current <c>QuaternionCollection</c>.
        /// </summary>
        /// <param name="x">The <c>QuaternionCollection</c> whose elements should be added to the end of the current <c>QuaternionCollection</c>.</param>
        /// <returns>The new <see cref="QuaternionCollection.Count"/> of the <c>QuaternionCollection</c>.</returns>
        public virtual int AddRange(QuaternionCollection x)
        {
            if (this.m_count + x.Count >= this.m_array.Length)
            {
                EnsureCapacity(this.m_count + x.Count);
            }

            Array.Copy(x.m_array, 0, this.m_array, this.m_count, x.Count);
            this.m_count += x.Count;
            this.m_version++;

            return(this.m_count);
        }
Ejemplo n.º 6
0
 /// <summary>
 ///		Initializes a new instance of the <c>Enumerator</c> class.
 /// </summary>
 /// <param name="tc"></param>
 internal Enumerator(QuaternionCollection tc) {
     this.m_collection = tc;
     this.m_index = -1;
     this.m_version = tc.m_version;
 }
Ejemplo n.º 7
0
 /// <summary>
 ///		Creates a synchronized (thread-safe) wrapper for a 
 ///     <c>QuaternionCollection</c> instance.
 /// </summary>
 /// <returns>
 ///     An <c>QuaternionCollection</c> wrapper that is synchronized (thread-safe).
 /// </returns>
 public static QuaternionCollection Synchronized(QuaternionCollection list) {
     if (list == null) {
         throw new ArgumentNullException("list");
     }
     return new SyncQuaternionCollection(list);
 }
Ejemplo n.º 8
0
 public override int AddRange(QuaternionCollection x)
 {
     throw new NotSupportedException("This is a Read Only Collection and can not be modified");
 }
Ejemplo n.º 9
0
 internal ReadOnlyQuaternionCollection(QuaternionCollection list)
     : base(Tag.Default)
 {
     this.m_collection = list;
 }
Ejemplo n.º 10
0
 public override int AddRange(QuaternionCollection x) {
     throw new NotSupportedException("This is a Read Only Collection and can not be modified");
 }
Ejemplo n.º 11
0
        /// <summary>
        ///		Adds the elements of another <c>QuaternionCollection</c> to the current <c>QuaternionCollection</c>.
        /// </summary>
        /// <param name="x">The <c>QuaternionCollection</c> whose elements should be added to the end of the current <c>QuaternionCollection</c>.</param>
        /// <returns>The new <see cref="QuaternionCollection.Count"/> of the <c>QuaternionCollection</c>.</returns>
        public virtual int AddRange( QuaternionCollection x )
        {
            if ( m_count + x.Count >= m_array.Length )
                EnsureCapacity( m_count + x.Count );

            Array.Copy( x.m_array, 0, m_array, m_count, x.Count );
            m_count += x.Count;
            m_version++;

            return m_count;
        }
Ejemplo n.º 12
0
 internal SyncQuaternionCollection(QuaternionCollection list)
     : base(Tag.Default)
 {
     this.m_root       = list.SyncRoot;
     this.m_collection = list;
 }
Ejemplo n.º 13
0
 /// <summary>
 ///		Initializes a new instance of the <c>QuaternionCollection</c> class
 ///		that contains elements copied from the specified <c>QuaternionCollection</c>.
 /// </summary>
 /// <param name="c">The <c>QuaternionCollection</c> whose elements are copied to the new collection.</param>
 public QuaternionCollection(QuaternionCollection c)
 {
     this.m_array = new Quaternion[c.Count];
     AddRange(c);
 }
Ejemplo n.º 14
0
        /// <summary>
        ///		Adds the elements of another <c>QuaternionCollection</c> to the current <c>QuaternionCollection</c>.
        /// </summary>
        /// <param name="x">The <c>QuaternionCollection</c> whose elements should be added to the end of the current <c>QuaternionCollection</c>.</param>
        /// <returns>The new <see cref="QuaternionCollection.Count"/> of the <c>QuaternionCollection</c>.</returns>
        public virtual int AddRange(QuaternionCollection x) {
            if (this.m_count + x.Count >= this.m_array.Length) {
                EnsureCapacity(this.m_count + x.Count);
            }

            Array.Copy(x.m_array, 0, this.m_array, this.m_count, x.Count);
            this.m_count += x.Count;
            this.m_version++;

            return this.m_count;
        }
Ejemplo n.º 15
0
        /// <summary>
        ///		Creates a shallow copy of the <see cref="QuaternionCollection"/>.
        /// </summary>
        public virtual object Clone() {
            var newColl = new QuaternionCollection(this.m_count);
            Array.Copy(this.m_array, 0, newColl.m_array, 0, this.m_count);
            newColl.m_count = this.m_count;
            newColl.m_version = this.m_version;

            return newColl;
        }
Ejemplo n.º 16
0
 /// <summary>
 ///		Initializes a new instance of the <c>QuaternionCollection</c> class
 ///		that contains elements copied from the specified <c>QuaternionCollection</c>.
 /// </summary>
 /// <param name="c">The <c>QuaternionCollection</c> whose elements are copied to the new collection.</param>
 public QuaternionCollection(QuaternionCollection c) {
     this.m_array = new Quaternion[c.Count];
     AddRange(c);
 }
Ejemplo n.º 17
0
 /// <summary>
 ///		Creates a read-only wrapper for a 
 ///     <c>QuaternionCollection</c> instance.
 /// </summary>
 /// <returns>
 ///     An <c>QuaternionCollection</c> wrapper that is read-only.
 /// </returns>
 public static QuaternionCollection ReadOnly(QuaternionCollection list) {
     if (list == null) {
         throw new ArgumentNullException("list");
     }
     return new ReadOnlyQuaternionCollection(list);
 }
Ejemplo n.º 18
0
 internal SyncQuaternionCollection(QuaternionCollection list)
     : base(Tag.Default) {
     this.m_root = list.SyncRoot;
     this.m_collection = list;
 }
Ejemplo n.º 19
0
 public override int AddRange(QuaternionCollection x) {
     lock (this.m_root)
         return this.m_collection.AddRange(x);
 }
Ejemplo n.º 20
0
 /// <summary>
 ///		Initializes a new instance of the <c>Enumerator</c> class.
 /// </summary>
 /// <param name="tc"></param>
 internal Enumerator(QuaternionCollection tc)
 {
     this.m_collection = tc;
     this.m_index      = -1;
     this.m_version    = tc.m_version;
 }
Ejemplo n.º 21
0
 internal ReadOnlyQuaternionCollection(QuaternionCollection list)
     : base(Tag.Default) {
     this.m_collection = list;
 }
Ejemplo n.º 22
0
 public override int AddRange(QuaternionCollection x)
 {
     lock (this.m_root)
         return(this.m_collection.AddRange(x));
 }
Ejemplo n.º 23
0
        /// <summary>
        ///		Creates a shallow copy of the <see cref="QuaternionCollection"/>.
        /// </summary>
        public virtual object Clone()
        {
            QuaternionCollection newColl = new QuaternionCollection( m_count );
            Array.Copy( m_array, 0, newColl.m_array, 0, m_count );
            newColl.m_count = m_count;
            newColl.m_version = m_version;

            return newColl;
        }