mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
xrt: Rename xrt_uv_triplet
This commit is contained in:
parent
2ef1affb2b
commit
9a675cc7f3
|
@ -26,7 +26,7 @@ typedef bool (*func_calc)(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result);
|
struct xrt_uv_triplet *result);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
index_for(int row, int col, int stride, int offset)
|
index_for(int row, int col, int stride, int offset)
|
||||||
|
@ -80,7 +80,7 @@ run_func(struct xrt_device *xdev,
|
||||||
verts[i + 1] = v * 2.0 - 1.0;
|
verts[i + 1] = v * 2.0 - 1.0;
|
||||||
|
|
||||||
if (!calc(xdev, view, u, v,
|
if (!calc(xdev, view, u, v,
|
||||||
(struct xrt_vec2_triplet
|
(struct xrt_uv_triplet
|
||||||
*)&verts[i + 2])) {
|
*)&verts[i + 2])) {
|
||||||
// bail on error, without updating
|
// bail on error, without updating
|
||||||
// distortion.preferred
|
// distortion.preferred
|
||||||
|
@ -137,7 +137,7 @@ bool
|
||||||
u_compute_distortion_vive(struct u_vive_values *values,
|
u_compute_distortion_vive(struct u_vive_values *values,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
const struct u_vive_values val = *values;
|
const struct u_vive_values val = *values;
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ bool
|
||||||
u_compute_distortion_panotools(struct u_panotools_values *values,
|
u_compute_distortion_panotools(struct u_panotools_values *values,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
const struct u_panotools_values val = *values;
|
const struct u_panotools_values val = *values;
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ u_compute_distortion_panotools(struct u_panotools_values *values,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
u_compute_distortion_none(float u, float v, struct xrt_vec2_triplet *result)
|
u_compute_distortion_none(float u, float v, struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
result->r.x = u;
|
result->r.x = u;
|
||||||
result->r.y = v;
|
result->r.y = v;
|
||||||
|
@ -249,7 +249,7 @@ compute_distortion_none(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
return u_compute_distortion_none(u, v, result);
|
return u_compute_distortion_none(u, v, result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ bool
|
||||||
u_compute_distortion_panotools(struct u_panotools_values *values,
|
u_compute_distortion_panotools(struct u_panotools_values *values,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result);
|
struct xrt_uv_triplet *result);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Distortion correction implementation for the Vive, Vive Pro, Valve Index
|
* Distortion correction implementation for the Vive, Vive Pro, Valve Index
|
||||||
|
@ -76,7 +76,7 @@ bool
|
||||||
u_compute_distortion_vive(struct u_vive_values *values,
|
u_compute_distortion_vive(struct u_vive_values *values,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result);
|
struct xrt_uv_triplet *result);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Identity distortion correction sets all result coordinates to u,v.
|
* Identity distortion correction sets all result coordinates to u,v.
|
||||||
|
@ -84,7 +84,7 @@ u_compute_distortion_vive(struct u_vive_values *values,
|
||||||
* @ingroup aux_util
|
* @ingroup aux_util
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
u_compute_distortion_none(float u, float v, struct xrt_vec2_triplet *result);
|
u_compute_distortion_none(float u, float v, struct xrt_uv_triplet *result);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Given a @ref xrt_device generates meshes by calling
|
* Given a @ref xrt_device generates meshes by calling
|
||||||
|
|
|
@ -117,7 +117,7 @@ ns_mesh_calc(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct ns_hmd *ns = ns_hmd(xdev);
|
struct ns_hmd *ns = ns_hmd(xdev);
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ ns_v2_mesh_calc(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct ns_hmd *ns = ns_hmd(xdev);
|
struct ns_hmd *ns = ns_hmd(xdev);
|
||||||
|
|
||||||
|
|
|
@ -426,7 +426,7 @@ static bool
|
||||||
u_compute_distortion_openhmd(struct openhmd_values *values,
|
u_compute_distortion_openhmd(struct openhmd_values *values,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct openhmd_values val = *values;
|
struct openhmd_values val = *values;
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ compute_distortion_openhmd(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct oh_device *ohd = oh_device(xdev);
|
struct oh_device *ohd = oh_device(xdev);
|
||||||
return u_compute_distortion_openhmd(&ohd->distortion.openhmd[view], u,
|
return u_compute_distortion_openhmd(&ohd->distortion.openhmd[view], u,
|
||||||
|
@ -479,7 +479,7 @@ compute_distortion_vive(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct oh_device *ohd = oh_device(xdev);
|
struct oh_device *ohd = oh_device(xdev);
|
||||||
return u_compute_distortion_vive(&ohd->distortion.vive[view], u, v,
|
return u_compute_distortion_vive(&ohd->distortion.vive[view], u, v,
|
||||||
|
|
|
@ -992,7 +992,7 @@ psvr_compute_distortion(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct psvr_device *psvr = psvr_device(xdev);
|
struct psvr_device *psvr = psvr_device(xdev);
|
||||||
|
|
||||||
|
|
|
@ -909,7 +909,7 @@ compute_distortion(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct survive_device *d = (struct survive_device *)xdev;
|
struct survive_device *d = (struct survive_device *)xdev;
|
||||||
return u_compute_distortion_vive(&d->distortion[view], u, v, result);
|
return u_compute_distortion_vive(&d->distortion[view], u, v, result);
|
||||||
|
|
|
@ -800,7 +800,7 @@ compute_distortion(struct xrt_device *xdev,
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result)
|
struct xrt_uv_triplet *result)
|
||||||
{
|
{
|
||||||
struct vive_device *d = vive_device(xdev);
|
struct vive_device *d = vive_device(xdev);
|
||||||
return u_compute_distortion_vive(&d->distortion[view], u, v, result);
|
return u_compute_distortion_vive(&d->distortion[view], u, v, result);
|
||||||
|
|
|
@ -129,11 +129,11 @@ struct xrt_vec2
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Three xrt_vec2
|
* Represents a uv triplet for distortion, basically just three xrt_vec2.
|
||||||
*
|
*
|
||||||
* @ingroup xrt_iface_math
|
* @ingroup xrt_iface_math
|
||||||
*/
|
*/
|
||||||
struct xrt_vec2_triplet
|
struct xrt_uv_triplet
|
||||||
{
|
{
|
||||||
struct xrt_vec2 r, g, b;
|
struct xrt_vec2 r, g, b;
|
||||||
};
|
};
|
||||||
|
|
|
@ -278,7 +278,7 @@ struct xrt_device
|
||||||
int view,
|
int view,
|
||||||
float u,
|
float u,
|
||||||
float v,
|
float v,
|
||||||
struct xrt_vec2_triplet *result);
|
struct xrt_uv_triplet *result);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Destroy device.
|
* Destroy device.
|
||||||
|
|
Loading…
Reference in a new issue