/// <summary>
		/// Add a new part to the composition.
		/// </summary>
		/// <param name="part">The part to add. This object must not already be owned by another composition.</param>
		public virtual void Add(Part part)
		{
			if (part.Owner != null)
				throw new ArgumentException("The part already belongs to a composition.");
			part.Owner = this;
			_parts.Add(part);
			AlignedBox tmp;
			part.BoundingBox(out tmp);
			AlignedBox.Merge(ref BoundingBox, ref tmp, out BoundingBox);
		}
Beispiel #2
0
        /// <summary>
        /// Add a new part to the composition.
        /// </summary>
        /// <param name="part">The part to add. This object must not already be owned by another composition.</param>
        public virtual void Add(Part part)
        {
            if (part.Owner != null)
            {
                throw new ArgumentException("The part already belongs to a composition.");
            }
            part.Owner = this;
            _parts.Add(part);
            AlignedBox tmp;

            part.BoundingBox(out tmp);
            AlignedBox.Merge(ref BoundingBox, ref tmp, out BoundingBox);
        }