public AABB GetShapeBounds(Quaternion rotation)
        {
            var bounds    = ShapeSettings.CalculateBounds(rotation, gridTangent, gridBinormal);
            var direction = haveForcedDirection ? forcedDirection : buildPlane.normal;

            if (editMode == EditMode.ExtrudeShape)
            {
                bounds.Extrude(rotation * (direction * Height));
            }
            return(bounds);
        }
Esempio n. 2
0
        public AABB GetShapeBounds(Quaternion rotation)
        {
            if (editMode == EditMode.ExtrudeShape ||
                editMode == EditMode.EditShape)
            {
                return(settings.bounds);
            }

            var bounds = ShapeSettings.CalculateBounds(rotation, gridTangent, gridBinormal);

            if (settings.vertices.Length < 3)
            {
                bounds.Extend(rotation * worldPosition);
            }
            return(bounds);
        }
Esempio n. 3
0
		public override AABB GetShapeBounds()
		{
			return ShapeSettings.CalculateBounds(Quaternion.identity, gridTangent, gridBinormal);
		}