/// <summary> /// Adds the specified 3D shape to the handle. /// </summary> /// <returns> /// The index of the 3D shape inside the handle's 3D shape collection /// or -1 if the shape already exists. /// </returns> public int Add3DShape(Shape3D shape) { if (!Contains3DShape(shape)) { var gizmoHandleShape = new GizmoHandleShape3D(shape); _3DShapes.Add(gizmoHandleShape); return(_3DShapes.Count - 1); } return(-1); }
/// <summary> /// Removes the specifed 3D shape. The function has no effect if the handle doesn't contain /// the specified shape. /// </summary> public void Remove3DShape(Shape3D shape) { _3DShapes.RemoveAll(item => item.Shape == shape); }
/// <summary> /// Checks if the handle contains the specified 3D shape. /// </summary> public bool Contains3DShape(Shape3D shape) { return(_3DShapes.FindAll(item => item.Shape == shape).Count != 0); }
public GizmoHandleShape3D(Shape3D shape) { _shape = shape; }