/// <summary> /// Pixel position relative to specified bounds. /// For example, a typical render window has bounds [(0, 0), (width, height)]. /// </summary> public PixelPosition(int x, int y, int width, int height) { Position = new V2i(x, y); Bounds = Box2i.FromSize(width, height); }
/// <summary> /// PixelPosition from normalized device coordinates. /// </summary> public PixelPosition(Ndc3d ndc, V2i renderTargetSize) : this(ndc, Box2i.FromSize(renderTargetSize)) { }
/// <summary> /// Pixel position relative to specified bounds. /// For example, a typical render window has bounds [(0, 0), (width, height)]. /// </summary> public PixelPosition(V2i position, int width, int height) { Position = position; Bounds = Box2i.FromSize(width, height); }