Monado OpenXR Runtime
Enumerations | Functions
m_base.cpp File Reference

Base implementations for math library. More...

#include "math/m_api.h"
#include "math/m_eigen_interop.hpp"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <assert.h>
Include dependency graph for m_base.cpp:

Enumerations

enum  accumulate_pose_flags { OFFSET, LEGACY }
 

Functions

bool math_vec3_validate (const struct xrt_vec3 *vec3)
 
void math_vec3_accum (const struct xrt_vec3 *additional, struct xrt_vec3 *inAndOut)
 
void math_vec3_cross (const struct xrt_vec3 *l, const struct xrt_vec3 *r, struct xrt_vec3 *result)
 
void math_quat_from_angle_vector (float angle_rads, const struct xrt_vec3 *vector, struct xrt_quat *result)
 
void math_quat_from_matrix_3x3 (const struct xrt_matrix_3x3 *mat, struct xrt_quat *result)
 
void math_quat_from_plus_x_z (const struct xrt_vec3 *plus_x, const struct xrt_vec3 *plus_z, struct xrt_quat *result)
 
bool math_quat_validate (const struct xrt_quat *quat)
 
void math_quat_normalize (struct xrt_quat *inout)
 
void math_quat_rotate (const struct xrt_quat *left, const struct xrt_quat *right, struct xrt_quat *result)
 
void math_quat_rotate_vec3 (const struct xrt_quat *left, const struct xrt_vec3 *right, struct xrt_vec3 *result)
 Rotate a vector. More...
 
void math_matrix_3x3_transform_vec3 (const struct xrt_matrix_3x3 *left, const struct xrt_vec3 *right, struct xrt_vec3 *result)
 
bool math_pose_validate (const struct xrt_pose *pose)
 
void math_pose_invert (const struct xrt_pose *pose, struct xrt_pose *outPose)
 
void math_pose_transform (const struct xrt_pose *transform, const struct xrt_pose *pose, struct xrt_pose *outPose)
 
void math_pose_transform_point (const struct xrt_pose *transform, const struct xrt_vec3 *point, struct xrt_vec3 *out_point)
 
void math_pose_openxr_locate (const struct xrt_pose *space_pose, const struct xrt_pose *relative_pose, const struct xrt_pose *base_space_pose, struct xrt_pose *result)
 
void math_relation_reset (struct xrt_space_relation *out)
 
void math_relation_apply_offset (const struct xrt_pose *offset, struct xrt_space_relation *in_out_relation)
 
void accumulate_transform (const struct xrt_pose *transform, struct xrt_space_relation *in_out_relation)
 
void math_relation_accumulate_relation (const struct xrt_space_relation *additional_relation, struct xrt_space_relation *in_out_relation)
 
void math_relation_openxr_locate (const struct xrt_pose *space_pose, const struct xrt_space_relation *relative_relation, const struct xrt_pose *base_space_pose, struct xrt_space_relation *result)
 

Detailed Description

Base implementations for math library.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om

Enumeration Type Documentation

◆ accumulate_pose_flags

Enumerator
OFFSET 
LEGACY 

Function Documentation

◆ accumulate_transform()

void accumulate_transform ( const struct xrt_pose transform,
struct xrt_space_relation in_out_relation 
)

◆ math_matrix_3x3_transform_vec3()

void math_matrix_3x3_transform_vec3 ( const struct xrt_matrix_3x3 left,
const struct xrt_vec3 right,
struct xrt_vec3 result 
)

References xrt_matrix_3x3::v.

◆ math_pose_invert()

void math_pose_invert ( const struct xrt_pose pose,
struct xrt_pose outPose 
)
related

◆ math_pose_openxr_locate()

void math_pose_openxr_locate ( const struct xrt_pose space_pose,
const struct xrt_pose relative_pose,
const struct xrt_pose base_space_pose,
struct xrt_pose result 
)
related

◆ math_pose_transform()

void math_pose_transform ( const struct xrt_pose transform,
const struct xrt_pose pose,
struct xrt_pose outPose 
)
related

◆ math_pose_transform_point()

void math_pose_transform_point ( const struct xrt_pose transform,
const struct xrt_vec3 point,
struct xrt_vec3 out_point 
)
related

◆ math_pose_validate()

bool math_pose_validate ( const struct xrt_pose pose)
related

◆ math_quat_from_angle_vector()

void math_quat_from_angle_vector ( float  angle_rads,
const struct xrt_vec3 vector,
struct xrt_quat result 
)
related

◆ math_quat_from_matrix_3x3()

void math_quat_from_matrix_3x3 ( const struct xrt_matrix_3x3 mat,
struct xrt_quat result 
)
related

References xrt_matrix_3x3::v.

◆ math_quat_from_plus_x_z()

void math_quat_from_plus_x_z ( const struct xrt_vec3 plus_x,
const struct xrt_vec3 plus_z,
struct xrt_quat result 
)
related

◆ math_quat_normalize()

void math_quat_normalize ( struct xrt_quat inout)
related

◆ math_quat_rotate()

void math_quat_rotate ( const struct xrt_quat left,
const struct xrt_quat right,
struct xrt_quat result 
)
related

◆ math_quat_validate()

bool math_quat_validate ( const struct xrt_quat quat)
related

◆ math_relation_accumulate_relation()

void math_relation_accumulate_relation ( const struct xrt_space_relation additional_relation,
struct xrt_space_relation in_out_relation 
)
related

◆ math_relation_apply_offset()

void math_relation_apply_offset ( const struct xrt_pose offset,
struct xrt_space_relation in_out_relation 
)
related

◆ math_relation_openxr_locate()

void math_relation_openxr_locate ( const struct xrt_pose space_pose,
const struct xrt_space_relation relative_relation,
const struct xrt_pose base_space_pose,
struct xrt_space_relation result 
)
related

◆ math_relation_reset()

void math_relation_reset ( struct xrt_space_relation out)
related

◆ math_vec3_accum()

void math_vec3_accum ( const struct xrt_vec3 additional,
struct xrt_vec3 inAndOut 
)
related

◆ math_vec3_cross()

void math_vec3_cross ( const struct xrt_vec3 l,
const struct xrt_vec3 r,
struct xrt_vec3 result 
)
related

◆ math_vec3_validate()

bool math_vec3_validate ( const struct xrt_vec3 vec3)
related