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


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
