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:
Moshi Turner 2023-04-08 17:22:13 -05:00
parent 19e0af55d2
commit f2bea2c7c6
4 changed files with 9 additions and 9 deletions

View file

@ -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.
*
*/

View file

@ -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
*/

View file

@ -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: {

View file

@ -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.