FreeBSD Manual Pages
vr_metadata(3) Arcan Lua API vr_metadata(3) NAME vr_metadata - retrieve metadata from a vr bridge SYNOPSIS strtbl or nil vr_metadata( vid:id ) DESCRIPTION In order to setup a useful 3d pipeline for working with HMD s, you need ac- cess to some metadata. This function is used to retrieve a table of the relevant parameters needed for creating a distortion mesh or a barrel dis- tortion shader that tmach the specified vr device. The currently available keys in strtbl are: [width : display horizontal resolution in pixels], [height : display vertical resolution in pixels], [center : distance from edge to center, (m)], [left_fov : left field of view], [right_fov : right field of view], [left_ar : left aspect ratio], [right_ar : right aspect ra- tio], [hsep : horizontal separation], [vpos : vertical position], [horizon- tal : display horizontal physical size, in m], [vertical : display vertical physical size, in m], [eye_display : distance from eyes to display, in m], [ipd : interpupillary distance, in m], [distortion : subtable of 4 floats with lens distortion data], [abberation : subtable of 4 floats with lens distortion data], [projection_left] : suggested HMD left eye projection matrix, [projection_right] : suggesteed HMD right eye projection matrix If the metadata couldn't be accessed at this time due to some problem with the internal state of the vr bridge, or if id doesn't refer to a valid vr- bridge instance, the function will return nil. The best indicator for if the bridge metadata has been available or not is after a 'limb_added' event. EXAMPLE function vr_metadata0() local bridge = vr_setup("test", function(source, status) if (status.kind == "limb_added") then local tbl = vr_metadata(source); if (tbl) then print(string.format( "test-hmd values:0idthxheight - %f x %f0 .. "horiz, vert, center: %f , %f , %f0 .. "eye_display, ipd: %f , %f0, tbl.width, tbl.height, tbl.center, tbl.horizontal, tbl.vertical, tbl.eye_display, tbl.ipd) ); end shutdown(); end end); end SEE ALSO: vr_setup(3) vr_maplimb(3) iodev August 2026 vr_metadata(3)
NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=vr_metadata&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
