Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// PixelPosition from normalized device coordinates.
 /// </summary>
 public PixelPosition(Ndc3d ndc, V2i renderTargetSize)
     : this(ndc, Box2i.FromSize(renderTargetSize))
 {
 }
Ejemplo n.º 3
0
 /// <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);
 }