function Meta.SetOrientationYZ(F,v,o)F.topVector=v.unit F.rightVector=(F.topVector:Cross(o)).unit F.backVector=F.rightVector:Cross(F.topVector)end function Meta.VectorToObjectSpace(o,v)return v:Dot(o.rightVector),v:Dot(o.topVector),v:Dot(o.backVector)end function Meta.VectorToWorldSpace(o,v)return(v.x*o.rightVector+v.y*o.topVector)+v.z*o.backVector end function Meta.new()local v=setmetatable({},Meta)return v end return Meta

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;
