/// <summary>
        /// Adds the specified 2D shape to the handle.
        /// </summary>
        /// <returns>
        /// The index of the 2D shape inside the handle's 2D shape collection
        /// or -1 if the shape already exists.
        /// </returns>
        public int Add2DShape(Shape2D shape)
        {
            if (!Contains2DShape(shape))
            {
                var gizmoHandleShape = new GizmoHandleShape2D(shape);
                _2DShapes.Add(gizmoHandleShape);

                return(_2DShapes.Count - 1);
            }

            return(-1);
        }
 /// <summary>
 /// Removes the specifed 2D shape. The function has no effect if the handle doesn't contain
 /// the specified shape.
 /// </summary>
 public void Remove2DShape(Shape2D shape)
 {
     _2DShapes.RemoveAll(item => item.Shape == shape);
 }
 /// <summary>
 /// Checks if the handle contains the specified 2D shape.
 /// </summary>
 public bool Contains2DShape(Shape2D shape)
 {
     return(_2DShapes.FindAll(item => item.Shape == shape).Count != 0);
 }
 public GizmoHandleShape2D(Shape2D shape)
 {
     _shape = shape;
 }