mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +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,
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue