function region3.new(o,T)local u={}u.CFrame=o u.Size=T u.input={vertices.block(o,T*.5,{})}u.support=support.pointCloud u.centroid=o.p return setmetatable(u,region3_mt)end region3.block=region3.new function region3.wedge(o,T)local u={}u.CFrame=o u.Size=T u.input={vertices.wedge(o,T*.5,{})}u.support=support.pointCloud u.centroid=centroid(u.input[1])return setmetatable(u,region3_mt)end function region3.cornerWedge(o,T)local u={}u.CFrame=o u.Size=T u.input={vertices.cornerWedge(o,T*.5,{})}u.support=support.pointCloud u.centroid=centroid(u.input[1])return setmetatable(u,region3_mt)end function region3.cylinder(o,T)local u={}u.CFrame=o u.Size=T u.input={o,T*.5}u.support=support.cylinder u.centroid=o.p return setmetatable(u,region3_mt)end function region3.ellipsoid(o,T)local u={}u.CFrame=o u.Size=T u.input={o;T*.5}u.support=support.ellipsoid u.centroid=o.p return setmetatable(u,region3_mt)end function region3.pointCloud(o)local T={}T.CFrame=CFrame.new(centroid(o))T.Size=v3()T.input=o T.support=support.pointCloud T.centroid=T.CFrame.p return setmetatable(T,region3_mt)end function region3.fromPart(o)return classify(o)end
-- public static functions

function region3.new(cf, size)
	local self = {}
	self.CFrame = cf
	self.Size = size
	self.input = { vertices.block(cf, size * 0.5, {}) }
	self.support = support.pointCloud
	self.centroid = cf.p
	return setmetatable(self, region3_mt)
end

region3.block = region3.new

function region3.wedge(cf, size)
	local self = {}
	self.CFrame = cf
	self.Size = size
	self.input = { vertices.wedge(cf, size * 0.5, {}) }
	self.support = support.pointCloud
	self.centroid = centroid(self.input[1])
	return setmetatable(self, region3_mt)
end

function region3.cornerWedge(cf, size)
	local self = {}
	self.CFrame = cf
	self.Size = size
	self.input = { vertices.cornerWedge(cf, size * 0.5, {}) }
	self.support = support.pointCloud
	self.centroid = centroid(self.input[1])
	return setmetatable(self, region3_mt)
end

function region3.cylinder(cf, size)
	local self = {}
	self.CFrame = cf
	self.Size = size
	self.input = { cf, size * 0.5 }
	self.support = support.cylinder
	self.centroid = cf.p
	return setmetatable(self, region3_mt)
end

function region3.ellipsoid(cf, size)
	local self = {}
	self.CFrame = cf
	self.Size = size
	self.input = { cf, size * 0.5 }
	self.support = support.ellipsoid
	self.centroid = cf.p
	return setmetatable(self, region3_mt)
end

function region3.pointCloud(cloud)
	local self = {}
	self.CFrame = CFrame.new(centroid(cloud))
	self.Size = v3()
	self.input = cloud
	self.support = support.pointCloud
	self.centroid = self.CFrame.p
	return setmetatable(self, region3_mt)
end

function region3.fromPart(part)
	return classify(part)
end
