private Shape ChangeRockShape(Func <Shape> shapeFactory)
 {
     UndrawBoulder();
     RockShapeContainer = new MyRockShape(shapeFactory(), this);
     DrawBoulder();
     return(RockShapeContainer.GetShape());
 }
        // coorMap = null case for use when loading rocks from database
        public RockViewModel(Rock aRock, Canvas canvas, CoordinateMapper coorMap = null)
        {
            MyRock             = aRock;
            BCanvas            = canvas;
            RockShapeContainer = new MyRockShape(GetNewRockOnWallEllipse(), this);

            // TODO: performance issue!!!
            //CreateRockImageSequence();

            CameraSpacePoint csp = aRock.GetCameraSpacePoint();

            if (coorMap != null)
            {
                bCanvasPoint = coorMap.MapCameraSpacePointToPointOnCanvas(csp, canvas, SpaceMode.Color);
                bPoint       = canvas.GetNormalisedPoint(bCanvasPoint);
            }
        }