Class ViewportHitTest
- Namespace
- LansMap.Core.Interaction
Pure point-in-rect test for pointer-ownership checks, top-left screen origin against a bottom-left origin rect (the Unity camera pixelRect convention).
public static class ViewportHitTest
- Inheritance
-
objectViewportHitTest
Methods
Contains(double, double, double, double, double, double, double)
True when a top-left-origin screen point falls inside a
bottom-left-origin rect, after flipping the point against
screenHeightPx.
public static bool Contains(double screenTopLeftX, double screenTopLeftY, double rectX, double rectY, double rectWidth, double rectHeight, double screenHeightPx)
Parameters
screenTopLeftXdoublePointer X, top-left origin.
screenTopLeftYdoublePointer Y, top-left origin.
rectXdoubleRect origin X, bottom-left origin.
rectYdoubleRect origin Y, bottom-left origin.
rectWidthdoubleRect width.
rectHeightdoubleRect height.
screenHeightPxdoubleScreen height in px, used to flip the point.