function moduleApiTable.RayPlaneIntersection(u,P,p,W)p=p.unit P=P.Unit local Y=p:Dot(P.Direction)if Y==0 then return nil end local f=p:Dot(W-P.Origin)local h=f/Y if h<0 then return nil end return P.Origin+P.Direction*h end function moduleApiTable.GetEaseLinear(P)return Linear end function moduleApiTable.GetEaseOutQuad(P)return EaseOutQuad end function moduleApiTable.GetEaseInOutQuad(P)return EaseInOutQuad end function moduleApiTable.CreateNewSlider(u,P,p,W)return CreateNewSlider(P,p,W)end function moduleApiTable.CreateNewSelector(W,P,p)return CreateSelector(P,p)end function moduleApiTable.CreateNewDropDown(W,P,p)return CreateDropDown(P,p,nil)end function moduleApiTable.AddNewRow(h,P,p,W,u,Y,f)return AddNewRow(P,p,W,u,Y,f)end function moduleApiTable.AddNewRowObject(Y,P,p,W,u)return AddNewRowObject(P,p,W,u)end function moduleApiTable.ShowAlert(f,P,p,W,u,Y)ShowAlert(P,p,W,u,Y)end function moduleApiTable.IsSmallTouchScreen(P)return isSmallTouchScreen()end function moduleApiTable.IsPortrait(P)return isPortrait()end function moduleApiTable.MakeStyledButton(h,P,p,W,u,Y,f)return MakeButton(P,p,W,u,Y,f)end function moduleApiTable.MakeStyledImageButton(O,P,p,W,u,Y,f,h)return MakeImageButton(P,p,W,u,Y,f,h)end function moduleApiTable.AddButtonRow(h,P,p,W,u,Y,f)return AddButtonRow(P,p,W,u,Y,f)end function moduleApiTable.CreateSignal(P)return CreateSignal()end function moduleApiTable.UsesSelectedObject(P)return usesSelectedObject()end function moduleApiTable.TweenProperty(O,P,p,W,u,Y,f,h)return PropertyTweener(P,p,W,u,Y,f,h)end function moduleApiTable.OnResized(W,P,p)return addOnResizedCallback(P,p)end function moduleApiTable.FireOnResized(P)local p=getViewportSize()local W=moduleApiTable:IsPortrait()for P,u in pairs(onResizedCallbacks)do u(p,W)end end
-- RayPlaneIntersection (shortened)
-- http://www.siggraph.org/education/materials/HyperGraph/raytrace/rayplane_intersection.htm
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
