Monado OpenXR Runtime
u_visibility_mask.c File Reference

Visibility mask utilitary. More...

#include "math/m_mathinclude.h"
#include "u_misc.h"
#include "u_visibility_mask.h"
#include "u_logging.h"
#include <string.h>
Include dependency graph for u_visibility_mask.c:

Functions

void u_visibility_mask_get_default (enum xrt_visibility_mask_type type, const struct xrt_fov *fov, struct xrt_visibility_mask **out_mask)
 Default visibility mask, only returns a very simple mask with four small triangles in each corner, scaled to the given FoV so it matches the OpenXR conventions. More...
 

Variables

static const struct xrt_vec2 vertices_hidden []
 
static const uint32_t indices_hidden [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
 
static const struct xrt_vec2 vertices_visible []
 
static const uint32_t indices_visible []
 
static const struct xrt_vec2 vertices_line []
 
static const uint32_t indices_line [] = {0, 1, 2, 3, 4, 5, 6, 7}
 

Detailed Description

Visibility mask utilitary.

Author
Simon Zeni simon.nosp@m..zen.nosp@m.i@col.nosp@m.labo.nosp@m.ra.co.nosp@m.m

Variable Documentation

◆ indices_visible

const uint32_t indices_visible[]
static
Initial value:
= {
8, 2, 1, 3, 2, 8, 8, 1, 0, 6, 8, 7, 4, 8, 5, 8, 0, 7, 5, 8, 6, 4, 3, 8,
}

◆ vertices_hidden

const struct xrt_vec2 vertices_hidden[]
static
Initial value:
= {
{1.0, 0.75}, {1.0, 1.0}, {0.75, 1.0}, {-1.0, 1.0}, {-1.0, 0.75}, {-0.75, 1.0},
{-1.0, -0.75}, {-1.0, -1.0}, {-0.75, -1.0}, {0.75, -1.0}, {1.0, -1.0}, {1.0, -0.75},
}

◆ vertices_line

const struct xrt_vec2 vertices_line[]
static
Initial value:
= {
{-.75f, -1.f}, {.75f, -1.f}, {1.f, -.75f}, {1.f, .75f}, {.75f, 1.f}, {-.75f, 1.f}, {-1.f, .75f}, {-1.f, -.75f},
}

◆ vertices_visible

const struct xrt_vec2 vertices_visible[]
static
Initial value:
= {
{1.f, -.75f}, {.75f, -1.f}, {-.75f, -1.f}, {-1.f, -.75f}, {-1.f, .75f},
{-.75f, 1.f}, {.75f, 1.f}, {1.f, .75f}, {0.f, 0.f},
}