--Set the orientation with Y taking precedence, then Z.

function Meta:SetOrientationYZ(upVector, backVector)
	self.topVector = upVector.unit;
	self.rightVector = self.topVector:Cross(backVector).unit;
	self.backVector = self.rightVector:Cross(self.topVector);
end

function Meta:VectorToObjectSpace(v)
	return v:Dot(self.rightVector), v:Dot(self.topVector), v:Dot(self.backVector);
end
function Meta:VectorToWorldSpace(v)
	return v.x * self.rightVector + v.y * self.topVector + v.z * self.backVector;
end

function Meta.new()
	local self = setmetatable({}, Meta);
	return self;
end

return Meta;
