public RectangleAABB InitializeShapedotsHelper(bool isNew = false) { autodotsShapeHelper.headMeshesController = headMeshesController; autodotsShapeHelper.SetType((int)ProgramCore.Project.ManType); autodotsShapeHelper.Initialise(HeadController.GetDots(ProgramCore.Project.ManType), isNew); if (!isNew) { autodotsShapeHelper.TransformRects(); } var result = new RectangleAABB(); if (isNew && ProgramCore.Project.ManType != ManType.Custom) { Vector3 min = result.A, max = result.B; for (var i = 8; i < autodotsShapeHelper.ShapeInfo.Points.Count; ++i) { var p = autodotsShapeHelper.ShapeInfo.Points[i]; min.X = Math.Min(p.Value.X, min.X); min.Y = Math.Min(p.Value.Y, min.Y); max.X = Math.Max(p.Value.X, max.X); max.Y = Math.Max(p.Value.Y, max.Y); } result.A = min; result.B = max; } return(result); }