-- 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;
