From 9a675cc7f317d927d8b519a8d8c07fc191054852 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 30 Sep 2020 15:35:57 +0100 Subject: [PATCH] xrt: Rename xrt_uv_triplet --- src/xrt/auxiliary/util/u_distortion_mesh.c | 12 ++++++------ src/xrt/auxiliary/util/u_distortion_mesh.h | 6 +++--- src/xrt/drivers/north_star/ns_hmd.c | 4 ++-- src/xrt/drivers/ohmd/oh_device.c | 6 +++--- src/xrt/drivers/psvr/psvr_device.c | 2 +- src/xrt/drivers/survive/survive_driver.c | 2 +- src/xrt/drivers/vive/vive_device.c | 2 +- src/xrt/include/xrt/xrt_defines.h | 4 ++-- src/xrt/include/xrt/xrt_device.h | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/xrt/auxiliary/util/u_distortion_mesh.c b/src/xrt/auxiliary/util/u_distortion_mesh.c index c8f233b51..6c6f395c1 100644 --- a/src/xrt/auxiliary/util/u_distortion_mesh.c +++ b/src/xrt/auxiliary/util/u_distortion_mesh.c @@ -26,7 +26,7 @@ typedef bool (*func_calc)(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result); + struct xrt_uv_triplet *result); static int 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; if (!calc(xdev, view, u, v, - (struct xrt_vec2_triplet + (struct xrt_uv_triplet *)&verts[i + 2])) { // bail on error, without updating // distortion.preferred @@ -137,7 +137,7 @@ bool u_compute_distortion_vive(struct u_vive_values *values, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { const struct u_vive_values val = *values; @@ -195,7 +195,7 @@ bool u_compute_distortion_panotools(struct u_panotools_values *values, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { const struct u_panotools_values val = *values; @@ -233,7 +233,7 @@ u_compute_distortion_panotools(struct u_panotools_values *values, } 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.y = v; @@ -249,7 +249,7 @@ compute_distortion_none(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { return u_compute_distortion_none(u, v, result); } diff --git a/src/xrt/auxiliary/util/u_distortion_mesh.h b/src/xrt/auxiliary/util/u_distortion_mesh.h index 870bc3b0d..3c6c2f006 100644 --- a/src/xrt/auxiliary/util/u_distortion_mesh.h +++ b/src/xrt/auxiliary/util/u_distortion_mesh.h @@ -64,7 +64,7 @@ bool u_compute_distortion_panotools(struct u_panotools_values *values, float u, float v, - struct xrt_vec2_triplet *result); + struct xrt_uv_triplet *result); /*! * Distortion correction implementation for the Vive, Vive Pro, Valve Index @@ -76,7 +76,7 @@ bool u_compute_distortion_vive(struct u_vive_values *values, float u, float v, - struct xrt_vec2_triplet *result); + struct xrt_uv_triplet *result); /*! * 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 */ 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 diff --git a/src/xrt/drivers/north_star/ns_hmd.c b/src/xrt/drivers/north_star/ns_hmd.c index 38b425434..8d6f960d9 100644 --- a/src/xrt/drivers/north_star/ns_hmd.c +++ b/src/xrt/drivers/north_star/ns_hmd.c @@ -117,7 +117,7 @@ ns_mesh_calc(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct ns_hmd *ns = ns_hmd(xdev); @@ -299,7 +299,7 @@ ns_v2_mesh_calc(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct ns_hmd *ns = ns_hmd(xdev); diff --git a/src/xrt/drivers/ohmd/oh_device.c b/src/xrt/drivers/ohmd/oh_device.c index ac0d0b80a..1356cb6d0 100644 --- a/src/xrt/drivers/ohmd/oh_device.c +++ b/src/xrt/drivers/ohmd/oh_device.c @@ -426,7 +426,7 @@ static bool u_compute_distortion_openhmd(struct openhmd_values *values, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct openhmd_values val = *values; @@ -467,7 +467,7 @@ compute_distortion_openhmd(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct oh_device *ohd = oh_device(xdev); return u_compute_distortion_openhmd(&ohd->distortion.openhmd[view], u, @@ -479,7 +479,7 @@ compute_distortion_vive(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct oh_device *ohd = oh_device(xdev); return u_compute_distortion_vive(&ohd->distortion.vive[view], u, v, diff --git a/src/xrt/drivers/psvr/psvr_device.c b/src/xrt/drivers/psvr/psvr_device.c index f7ce91c7c..0db5e4e17 100644 --- a/src/xrt/drivers/psvr/psvr_device.c +++ b/src/xrt/drivers/psvr/psvr_device.c @@ -992,7 +992,7 @@ psvr_compute_distortion(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct psvr_device *psvr = psvr_device(xdev); diff --git a/src/xrt/drivers/survive/survive_driver.c b/src/xrt/drivers/survive/survive_driver.c index ee90d4fbd..cca22aa81 100644 --- a/src/xrt/drivers/survive/survive_driver.c +++ b/src/xrt/drivers/survive/survive_driver.c @@ -909,7 +909,7 @@ compute_distortion(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct survive_device *d = (struct survive_device *)xdev; return u_compute_distortion_vive(&d->distortion[view], u, v, result); diff --git a/src/xrt/drivers/vive/vive_device.c b/src/xrt/drivers/vive/vive_device.c index fce08e074..ed5c8bb8c 100644 --- a/src/xrt/drivers/vive/vive_device.c +++ b/src/xrt/drivers/vive/vive_device.c @@ -800,7 +800,7 @@ compute_distortion(struct xrt_device *xdev, int view, float u, float v, - struct xrt_vec2_triplet *result) + struct xrt_uv_triplet *result) { struct vive_device *d = vive_device(xdev); return u_compute_distortion_vive(&d->distortion[view], u, v, result); diff --git a/src/xrt/include/xrt/xrt_defines.h b/src/xrt/include/xrt/xrt_defines.h index 3d43737fb..a140bfe50 100644 --- a/src/xrt/include/xrt/xrt_defines.h +++ b/src/xrt/include/xrt/xrt_defines.h @@ -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 */ -struct xrt_vec2_triplet +struct xrt_uv_triplet { struct xrt_vec2 r, g, b; }; diff --git a/src/xrt/include/xrt/xrt_device.h b/src/xrt/include/xrt/xrt_device.h index 549c69885..dde0c6783 100644 --- a/src/xrt/include/xrt/xrt_device.h +++ b/src/xrt/include/xrt/xrt_device.h @@ -278,7 +278,7 @@ struct xrt_device int view, float u, float v, - struct xrt_vec2_triplet *result); + struct xrt_uv_triplet *result); /*! * Destroy device.