mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
d/ns; a/util: Remove old name from Moshi's distortion correction method
I don't hate my old name that much, but this is my last chance to change it before there's some "moshi-style" North Stars floating around.
This commit is contained in:
parent
19e0af55d2
commit
f2bea2c7c6
|
@ -324,7 +324,7 @@ u_compute_distortion_ns_p2d(struct u_ns_p2d_values *values, int view, float u, f
|
|||
|
||||
/*
|
||||
*
|
||||
* Moses Turner's mesh-grid-based North Star distortion correction.
|
||||
* Moshi Turner's mesh-grid-based North Star distortion correction.
|
||||
* This is a relatively ad-hoc thing I wrote; if this ends up going unused feel free to remove it.
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -134,7 +134,7 @@ u_compute_distortion_ns_p2d(struct u_ns_p2d_values *values, int view, float u, f
|
|||
|
||||
/*
|
||||
*
|
||||
* Values for Moses Turner's North Star distortion correction.
|
||||
* Values for Moshi Turner's North Star distortion correction.
|
||||
*
|
||||
*/
|
||||
struct u_ns_meshgrid_values
|
||||
|
@ -149,7 +149,7 @@ struct u_ns_meshgrid_values
|
|||
};
|
||||
|
||||
/*!
|
||||
* Moses Turner's North Star distortion correction implementation
|
||||
* Moshi Turner's North Star distortion correction implementation
|
||||
*
|
||||
* @ingroup aux_distortion
|
||||
*/
|
||||
|
|
|
@ -242,7 +242,7 @@ cleanup_l3d:
|
|||
|
||||
/*
|
||||
*
|
||||
* Moses Turner's meshgrid-based distortion correction
|
||||
* Moshi Turner's meshgrid-based distortion correction
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -251,7 +251,7 @@ ns_mt_parse(struct ns_hmd *ns, const cJSON *json)
|
|||
{
|
||||
struct u_ns_meshgrid_values *values = &ns->config.dist_meshgrid;
|
||||
|
||||
if (strcmp(cJSON_GetStringValue(u_json_get(json, "type")), "Moses Turner's distortion correction") != 0) {
|
||||
if (strcmp(cJSON_GetStringValue(u_json_get(json, "type")), "meshgrid") != 0) {
|
||||
goto cleanup_mt;
|
||||
}
|
||||
int version = 0;
|
||||
|
@ -296,7 +296,7 @@ ns_mt_parse(struct ns_hmd *ns, const cJSON *json)
|
|||
}
|
||||
}
|
||||
// locked in
|
||||
ns->config.distortion_type = NS_DISTORTION_TYPE_MOSES_MESHGRID;
|
||||
ns->config.distortion_type = NS_DISTORTION_TYPE_MOSHI_MESHGRID;
|
||||
|
||||
float baseline = values->ipd;
|
||||
|
||||
|
@ -359,7 +359,7 @@ ns_hmd_destroy(struct xrt_device *xdev)
|
|||
if (ns->config.distortion_type == NS_DISTORTION_TYPE_GEOMETRIC_3D) {
|
||||
ns_3d_free_optical_system(&ns->config.dist_3d.eyes[0].optical_system);
|
||||
ns_3d_free_optical_system(&ns->config.dist_3d.eyes[1].optical_system);
|
||||
} else if (ns->config.distortion_type == NS_DISTORTION_TYPE_MOSES_MESHGRID) {
|
||||
} else if (ns->config.distortion_type == NS_DISTORTION_TYPE_MOSHI_MESHGRID) {
|
||||
free(ns->config.dist_meshgrid.grid[0]);
|
||||
free(ns->config.dist_meshgrid.grid[1]);
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ ns_mesh_calc(struct xrt_device *xdev, uint32_t view, float u, float v, struct xr
|
|||
case NS_DISTORTION_TYPE_POLYNOMIAL_2D: {
|
||||
return u_compute_distortion_ns_p2d(&ns->config.dist_p2d, view, u, v, result);
|
||||
}
|
||||
case NS_DISTORTION_TYPE_MOSES_MESHGRID: {
|
||||
case NS_DISTORTION_TYPE_MOSHI_MESHGRID: {
|
||||
return u_compute_distortion_ns_meshgrid(&ns->config.dist_meshgrid, view, u, v, result);
|
||||
}
|
||||
default: {
|
||||
|
|
|
@ -75,7 +75,7 @@ enum ns_distortion_type
|
|||
NS_DISTORTION_TYPE_INVALID,
|
||||
NS_DISTORTION_TYPE_GEOMETRIC_3D,
|
||||
NS_DISTORTION_TYPE_POLYNOMIAL_2D,
|
||||
NS_DISTORTION_TYPE_MOSES_MESHGRID,
|
||||
NS_DISTORTION_TYPE_MOSHI_MESHGRID,
|
||||
};
|
||||
|
||||
// The config json data gets dumped in here.
|
||||
|
|
Loading…
Reference in a new issue