function RotatedRegion3.new(n,U)local G=setmetatable({},RotatedRegion3)G.CFrame=n G.Size=U G.Shape="\066\108\111\099\107"G.Set=Vertices.Block(n,U/2)G.Support=Supports.PointCloud G.Centroid=n.p G.AlignedRegion3=Region3.new(worldBoundingBox(G.Set))return G end RotatedRegion3.Block=RotatedRegion3.new function RotatedRegion3.Wedge(n,U)local G=setmetatable({},RotatedRegion3)G.CFrame=n G.Size=U G.Shape="\087\101\100\103\101"G.Set=Vertices.Wedge(n,U/2)G.Support=Supports.PointCloud G.Centroid=Vertices.GetCentroid(G.Set)G.AlignedRegion3=Region3.new(worldBoundingBox(G.Set))return G end function RotatedRegion3.CornerWedge(n,U)local G=setmetatable({},RotatedRegion3)G.CFrame=n G.Size=U G.Shape="\067\111\114\110\101\114\087\101\100\103\101"G.Set=Vertices.CornerWedge(n,U/2)G.Support=Supports.PointCloud G.Centroid=Vertices.GetCentroid(G.Set)G.AlignedRegion3=Region3.new(worldBoundingBox(G.Set))return G end function RotatedRegion3.Cylinder(n,U)local G=setmetatable({},RotatedRegion3)G.CFrame=n G.Size=U G.Shape="\067\121\108\105\110\100\101\114"G.Set={n;U/2}G.Support=Supports.Cylinder G.Centroid=n.p G.AlignedRegion3=Region3.new(worldBoundingBox(getCorners(unpack(G.Set))))return G end function RotatedRegion3.Ball(n,U)local G=setmetatable({},RotatedRegion3)G.CFrame=n G.Size=U G.Shape="\066\097\108\108"G.Set={n,U/2}G.Support=Supports.Ellipsoid G.Centroid=n.p G.AlignedRegion3=Region3.new(worldBoundingBox(getCorners(unpack(G.Set))))return G end function RotatedRegion3.FromPart(n)return RotatedRegion3[Vertices.Classify(n)](n.CFrame,n.Size)end
-- Public Constructors

function RotatedRegion3.new(cframe, size)
	local self = setmetatable({}, RotatedRegion3)

	self.CFrame = cframe
	self.Size = size
	self.Shape = "Block"

	self.Set = Vertices.Block(cframe, size / 2)
	self.Support = Supports.PointCloud
	self.Centroid = cframe.p

	self.AlignedRegion3 = Region3.new(worldBoundingBox(self.Set))

	return self
end

RotatedRegion3.Block = RotatedRegion3.new

function RotatedRegion3.Wedge(cframe, size)
	local self = setmetatable({}, RotatedRegion3)

	self.CFrame = cframe
	self.Size = size
	self.Shape = "Wedge"

	self.Set = Vertices.Wedge(cframe, size / 2)
	self.Support = Supports.PointCloud
	self.Centroid = Vertices.GetCentroid(self.Set)

	self.AlignedRegion3 = Region3.new(worldBoundingBox(self.Set))

	return self
end

function RotatedRegion3.CornerWedge(cframe, size)
	local self = setmetatable({}, RotatedRegion3)

	self.CFrame = cframe
	self.Size = size
	self.Shape = "CornerWedge"

	self.Set = Vertices.CornerWedge(cframe, size / 2)
	self.Support = Supports.PointCloud
	self.Centroid = Vertices.GetCentroid(self.Set)

	self.AlignedRegion3 = Region3.new(worldBoundingBox(self.Set))

	return self
end

function RotatedRegion3.Cylinder(cframe, size)
	local self = setmetatable({}, RotatedRegion3)

	self.CFrame = cframe
	self.Size = size
	self.Shape = "Cylinder"

	self.Set = { cframe, size / 2 }
	self.Support = Supports.Cylinder
	self.Centroid = cframe.p

	self.AlignedRegion3 = Region3.new(worldBoundingBox(getCorners(unpack(self.Set))))

	return self
end

function RotatedRegion3.Ball(cframe, size)
	local self = setmetatable({}, RotatedRegion3)

	self.CFrame = cframe
	self.Size = size
	self.Shape = "Ball"

	self.Set = { cframe, size / 2 }
	self.Support = Supports.Ellipsoid
	self.Centroid = cframe.p

	self.AlignedRegion3 = Region3.new(worldBoundingBox(getCorners(unpack(self.Set))))

	return self
end

function RotatedRegion3.FromPart(part)
	return RotatedRegion3[Vertices.Classify(part)](part.CFrame, part.Size)
end
