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


function RotatedRegion3.new(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	self.CFrame = cframe
	self.Size = size
	self.Shape = "Block"
	
	self.Set = set
	self.Support = Supports.PointCloud
	self.Centroid = cframe.p
	
	self.AlignedRegion3 = Region3.new(worldBoundingBox(set))

	return self
end

RotatedRegion3.Block = RotatedRegion3.new

function RotatedRegion3.Wedge(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	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(set))

	return self
end

function RotatedRegion3.CornerWedge(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	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(set))

	return self
end

function RotatedRegion3.Cylinder(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	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(set))

	return self
end

function RotatedRegion3.Ball(cframe, size)
	local self = setmetatable({}, RotatedRegion3)
	local set = Vertices.Block(cframe, size/2)
	
	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(set))

	return self
end

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