SimulaVR driver code.
More...
#include "math/m_mathinclude.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "svr_interface.h"
#include "xrt/xrt_defines.h"
#include "xrt/xrt_device.h"
#include "math/m_api.h"
#include "math/m_space.h"
#include "math/m_vec2.h"
#include "os/os_time.h"
#include "os/os_threading.h"
#include "util/u_var.h"
#include "util/u_debug.h"
#include "util/u_device.h"
#include "util/u_time.h"
#include "util/u_json.h"
#include "util/u_misc.h"
#include "util/u_logging.h"
#include "util/u_distortion_mesh.h"
|
#define | SVR_TRACE(d, ...) U_LOG_XDEV_IFL_T(&d->base, d->log_level, __VA_ARGS__) |
|
#define | SVR_DEBUG(d, ...) U_LOG_XDEV_IFL_D(&d->base, d->log_level, __VA_ARGS__) |
|
#define | SVR_INFO(d, ...) U_LOG_XDEV_IFL_I(&d->base, d->log_level, __VA_ARGS__) |
|
#define | SVR_WARN(d, ...) U_LOG_XDEV_IFL_W(&d->base, d->log_level, __VA_ARGS__) |
|
#define | SVR_ERROR(d, ...) U_LOG_XDEV_IFL_E(&d->base, d->log_level, __VA_ARGS__) |
|
#define | DEG_TO_RAD(DEG) (DEG * M_PI / 180.) |
|
|
static struct svr_hmd * | svr_hmd (struct xrt_device *xdev) |
|
static void | svr_hmd_destroy (struct xrt_device *xdev) |
|
static xrt_result_t | svr_hmd_get_tracked_pose (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
|
static void | svr_hmd_get_view_poses (struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, int64_t at_timestamp_ns, uint32_t view_count, struct xrt_space_relation *out_head_relation, struct xrt_fov *out_fovs, struct xrt_pose *out_poses) |
|
bool | svr_mesh_calc (struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result) |
|
struct xrt_device * | svr_hmd_create (struct svr_two_displays_distortion *distortion) |
|
◆ svr_hmd_create()
- Todo:
- these should be true for the final product iirc but possibly not for the demo unit
◆ svr_hmd_get_view_poses()
static void svr_hmd_get_view_poses |
( |
struct xrt_device * |
xdev, |
|
|
const struct xrt_vec3 * |
default_eye_relation, |
|
|
int64_t |
at_timestamp_ns, |
|
|
uint32_t |
view_count, |
|
|
struct xrt_space_relation * |
out_head_relation, |
|
|
struct xrt_fov * |
out_fovs, |
|
|
struct xrt_pose * |
out_poses |
|
) |
| |
|
static |
◆ svr_mesh_calc()
- Todo:
- : remove hard-coding and move to u_distortion_mesh