| ScreenConfiguration | R Documentation |
Provides methods for converting between pixel, millimeter, and degree units.
screen_size_x_mmScreen width in mm.
screen_size_y_mmScreen height in mm.
screen_res_x_pixHorizontal screen resolution in pixels.
screen_res_y_pixVertical screen resolution in pixels.
viewing_distance_mmViewing distance in mm.
new()Creates a new ScreenConfiguration object with screen and viewing distance parameters.
ScreenConfiguration$new( screen_size_x_mm, screen_size_y_mm, screen_res_x_pix, screen_res_y_pix, viewing_distance_mm )
screen_size_x_mmScreen width in millimeters.
screen_size_y_mmScreen height in millimeters.
screen_res_x_pixHorizontal screen resolution in pixels.
screen_res_y_pixVertical screen resolution in pixels.
viewing_distance_mmViewing distance in millimeters.
A new ScreenConfiguration object.
sc <- ScreenConfiguration$new(500, 300, 1920, 1080, 600)
pix_to_mm()Converts pixel coordinates to millimeter coordinates on the screen.
ScreenConfiguration$pix_to_mm(x, y)
xHorizontal pixel coordinate.
yVertical pixel coordinate.
A list with x and y in millimeters.
sc$pix_to_mm(960, 540)
pix_to_deg()Converts pixel coordinates to an angular gaze direction in degrees.
ScreenConfiguration$pix_to_deg(x, y)
xHorizontal pixel coordinate.
yVertical pixel coordinate.
A list with azimuth ("azi") and elevation ("ele") in degrees.
sc$pix_to_deg(960, 540)
mm_to_deg()Converts millimeter coordinates to an angular gaze direction in degrees.
ScreenConfiguration$mm_to_deg(x, y)
xHorizontal position in millimeters.
yVertical position in millimeters.
A list with azimuth ("azi") and elevation ("ele") in degrees.
sc$mm_to_deg(100, 50)
mm_to_pix()Converts millimeter coordinates on the screen to pixel coordinates.
ScreenConfiguration$mm_to_pix(x, y)
xHorizontal position in millimeters.
yVertical position in millimeters.
A list with x and y in pixels.
sc$mm_to_pix(100, 50)
deg_to_mm()Converts an angular gaze direction in degrees to millimeter coordinates on the screen.
ScreenConfiguration$deg_to_mm(azi, ele)
aziAzimuth in degrees (Fick angles).
eleElevation in degrees (Fick angles).
A list with x and y in millimeters.
sc$deg_to_mm(2, 1)
deg_to_pix()Converts an angular gaze direction in degrees to pixel coordinates.
ScreenConfiguration$deg_to_pix(azi, ele)
aziAzimuth in degrees (Fick angles).
eleElevation in degrees (Fick angles).
A list with x and y in pixels.
sc$deg_to_pix(2, 1)
screen_extents()Computes the horizontal and vertical extents of the screen (in degrees).
ScreenConfiguration$screen_extents()
A list with width and height in degrees.
sc$screen_extents()
clone()The objects of this class are cloneable with this method.
ScreenConfiguration$clone(deep = FALSE)
deepWhether to make a deep clone.
sc <- ScreenConfiguration$new(500, 300, 1920, 1080, 600)
sc$pix_to_deg(960, 540)
## ------------------------------------------------
## Method `ScreenConfiguration$new`
## ------------------------------------------------
sc <- ScreenConfiguration$new(500, 300, 1920, 1080, 600)
## ------------------------------------------------
## Method `ScreenConfiguration$pix_to_mm`
## ------------------------------------------------
sc$pix_to_mm(960, 540)
## ------------------------------------------------
## Method `ScreenConfiguration$pix_to_deg`
## ------------------------------------------------
sc$pix_to_deg(960, 540)
## ------------------------------------------------
## Method `ScreenConfiguration$mm_to_deg`
## ------------------------------------------------
sc$mm_to_deg(100, 50)
## ------------------------------------------------
## Method `ScreenConfiguration$mm_to_pix`
## ------------------------------------------------
sc$mm_to_pix(100, 50)
## ------------------------------------------------
## Method `ScreenConfiguration$deg_to_mm`
## ------------------------------------------------
sc$deg_to_mm(2, 1)
## ------------------------------------------------
## Method `ScreenConfiguration$deg_to_pix`
## ------------------------------------------------
sc$deg_to_pix(2, 1)
## ------------------------------------------------
## Method `ScreenConfiguration$screen_extents`
## ------------------------------------------------
sc$screen_extents()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.