function moduleApiTable.RayPlaneIntersection(S,G,E,x)E=E.unit G=G.Unit local w=E:Dot(G.Direction)if w==0 then return nil end local s=E:Dot(x-G.Origin)local k=s/w if k<0 then return nil end return G.Origin+G.Direction*k end function moduleApiTable.GetEaseLinear(G)return Linear end function moduleApiTable.GetEaseOutQuad(G)return EaseOutQuad end function moduleApiTable.GetEaseInOutQuad(G)return EaseInOutQuad end function moduleApiTable.CreateNewSlider(S,G,E,x)return CreateNewSlider(G,E,x)end function moduleApiTable.CreateNewSelector(x,G,E)return CreateSelector(G,E)end function moduleApiTable.CreateNewDropDown(x,G,E)return CreateDropDown(G,E,nil)end function moduleApiTable.AddNewRow(k,G,E,x,S,w,s)return AddNewRow(G,E,x,S,w,s)end function moduleApiTable.AddNewRowObject(w,G,E,x,S)return AddNewRowObject(G,E,x,S)end function moduleApiTable.ShowAlert(s,G,E,x,S,w)ShowAlert(G,E,x,S,w)end function moduleApiTable.IsSmallTouchScreen(G)return isSmallTouchScreen()end function moduleApiTable.IsPortrait(G)return isPortrait()end function moduleApiTable.MakeStyledButton(k,G,E,x,S,w,s)return MakeButton(G,E,x,S,w,s)end function moduleApiTable.MakeStyledImageButton(D,G,E,x,S,w,s,k)return MakeImageButton(G,E,x,S,w,s,k)end function moduleApiTable.AddButtonRow(k,G,E,x,S,w,s)return AddButtonRow(G,E,x,S,w,s)end function moduleApiTable.CreateSignal(G)return CreateSignal()end function moduleApiTable.UsesSelectedObject(G)return usesSelectedObject()end function moduleApiTable.TweenProperty(D,G,E,x,S,w,s,k)return PropertyTweener(G,E,x,S,w,s,k)end function moduleApiTable.OnResized(x,G,E)return addOnResizedCallback(G,E)end function moduleApiTable.FireOnResized(G)local E=getViewportSize()local x=moduleApiTable:IsPortrait()for G,S in pairs(onResizedCallbacks)do S(E,x)end end

function moduleApiTable:RayPlaneIntersection(ray, planeNormal, pointOnPlane)
	planeNormal = planeNormal.unit
	ray = ray.Unit

	local Vd = planeNormal:Dot(ray.Direction)
	if Vd == 0 then -- parallel, no intersection
		return nil
	end

	local V0 = planeNormal:Dot(pointOnPlane - ray.Origin)
	local t = V0 / Vd
	if t < 0 then --plane is behind ray origin, and thus there is no intersection
		return nil
	end

	return ray.Origin + ray.Direction * t
end

function moduleApiTable:GetEaseLinear()
	return Linear
end
function moduleApiTable:GetEaseOutQuad()
	return EaseOutQuad
end
function moduleApiTable:GetEaseInOutQuad()
	return EaseInOutQuad
end

function moduleApiTable:CreateNewSlider(numOfSteps, startStep, minStep)
	return CreateNewSlider(numOfSteps, startStep, minStep)
end

function moduleApiTable:CreateNewSelector(selectionStringTable, startPosition)
	return CreateSelector(selectionStringTable, startPosition)
end

function moduleApiTable:CreateNewDropDown(dropDownStringTable, startPosition)
	return CreateDropDown(dropDownStringTable, startPosition, nil)
end

function moduleApiTable:AddNewRow(pageToAddTo, rowDisplayName, selectionType, rowValues, rowDefault, extraSpacing)
	return AddNewRow(pageToAddTo, rowDisplayName, selectionType, rowValues, rowDefault, extraSpacing)
end

function moduleApiTable:AddNewRowObject(pageToAddTo, rowDisplayName, rowObject, extraSpacing)
	return AddNewRowObject(pageToAddTo, rowDisplayName, rowObject, extraSpacing)
end

function moduleApiTable:ShowAlert(alertMessage, okButtonText, settingsHub, okPressedFunc, hasBackground)
	ShowAlert(alertMessage, okButtonText, settingsHub, okPressedFunc, hasBackground)
end

function moduleApiTable:IsSmallTouchScreen()
	return isSmallTouchScreen()
end

function moduleApiTable:IsPortrait()
	return isPortrait()
end

function moduleApiTable:MakeStyledButton(name, text, size, clickFunc, pageRef, hubRef)
	return MakeButton(name, text, size, clickFunc, pageRef, hubRef)
end

function moduleApiTable:MakeStyledImageButton(name, image, size, imageSize, clickFunc, pageRef, hubRef)
	return MakeImageButton(name, image, size, imageSize, clickFunc, pageRef, hubRef)
end

function moduleApiTable:AddButtonRow(pageToAddTo, name, text, size, clickFunc, hubRef)
	return AddButtonRow(pageToAddTo, name, text, size, clickFunc, hubRef)
end

function moduleApiTable:CreateSignal()
	return CreateSignal()
end

function  moduleApiTable:UsesSelectedObject()
	return usesSelectedObject()
end

function moduleApiTable:TweenProperty(instance, prop, start, final, duration, easingFunc, cbFunc)
	return PropertyTweener(instance, prop, start, final, duration, easingFunc, cbFunc)
end

function moduleApiTable:OnResized(key, callback)
	return addOnResizedCallback(key, callback)
end

function moduleApiTable:FireOnResized()
	local newSize = getViewportSize()
	local portrait = moduleApiTable:IsPortrait()

	for key, callback in pairs(onResizedCallbacks) do
		callback(newSize, portrait)
	end
end
