Monado OpenXR Runtime
xrt_vec3 Struct Reference

A 3 element vector with single floats. More...

#include <xrt/xrt_defines.h>

Collaboration diagram for xrt_vec3:

Data Fields

float x
 
float y
 
float z
 

Related Functions

(Note that these are not member functions.)

bool math_vec3_validate (const struct xrt_vec3 *vec3)
 Check if this vec3 is valid for math operations. More...
 
void math_vec3_accum (const struct xrt_vec3 *additional, struct xrt_vec3 *inAndOut)
 Accumulate a vector by adding in-place. More...
 
void math_vec3_subtract (const struct xrt_vec3 *subtrahend, struct xrt_vec3 *inAndOut)
 Subtract from a vector in-place. More...
 
void math_vec3_scalar_mul (float scalar, struct xrt_vec3 *inAndOut)
 Multiply a vector in-place. More...
 
void math_vec3_cross (const struct xrt_vec3 *l, const struct xrt_vec3 *r, struct xrt_vec3 *result)
 Cross product of a vector. More...
 
void math_vec3_translation_from_isometry (const struct xrt_matrix_4x4 *isometry, struct xrt_vec3 *result)
 Get translation vector from isometry matrix (col-major). More...
 
void math_vec3_normalize (struct xrt_vec3 *in)
 Normalize a vec3 in place. More...
 
#define XRT_VEC3_ZERO
 All-zero value for xrt_vec3. More...
 
#define XRT_VEC3_UNIT_X
 Value for xrt_vec3 with 1 in the x coordinate. More...
 
#define XRT_VEC3_UNIT_Y
 Value for xrt_vec3 with 1 in the y coordinate. More...
 
#define XRT_VEC3_UNIT_Z
 Value for xrt_vec3 with 1 in the z coordinate. More...
 

Detailed Description

A 3 element vector with single floats.

Friends And Related Function Documentation

◆ XRT_VEC3_UNIT_X

#define XRT_VEC3_UNIT_X
related
Value:
{ \
1.f, 0.f, 0.f \
}

Value for xrt_vec3 with 1 in the x coordinate.

◆ XRT_VEC3_UNIT_Y

#define XRT_VEC3_UNIT_Y
related
Value:
{ \
0.f, 1.f, 0.f \
}

Value for xrt_vec3 with 1 in the y coordinate.

Referenced by svr_hmd_get_view_poses().

◆ XRT_VEC3_UNIT_Z

#define XRT_VEC3_UNIT_Z
related
Value:
{ \
0.f, 0.f, 1.f \
}

Value for xrt_vec3 with 1 in the z coordinate.

◆ XRT_VEC3_ZERO

#define XRT_VEC3_ZERO
related
Value:
{ \
0.f, 0.f, 0.f \
}

All-zero value for xrt_vec3.

Referenced by wmr_config_precompute_transforms().


The documentation for this struct was generated from the following files: