Monado OpenXR Runtime
Loading...
Searching...
No Matches
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 Symbols

(Note that these are not member symbols.)

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

Detailed Description

A 3 element vector with single floats.

Friends And Related Symbol Documentation

◆ XRT_VEC3_UNIT_X

#define XRT_VEC3_UNIT_X   {1.f, 0.f, 0.f}
related

Value for xrt_vec3 with 1 in the x coordinate.

Referenced by vive_get_stereo_camera_calibration().

◆ XRT_VEC3_UNIT_Y

#define XRT_VEC3_UNIT_Y   {0.f, 1.f, 0.f}
related

Value for xrt_vec3 with 1 in the y coordinate.

Referenced by svr_hmd_get_view_poses(), and vive_get_stereo_camera_calibration().

◆ XRT_VEC3_UNIT_Z

#define XRT_VEC3_UNIT_Z   {0.f, 0.f, 1.f}
related

Value for xrt_vec3 with 1 in the z coordinate.

Referenced by vive_get_stereo_camera_calibration().

◆ XRT_VEC3_ZERO

#define XRT_VEC3_ZERO   {0.f, 0.f, 0.f}
related

All-zero value for xrt_vec3.

Referenced by oh_device_get_tracked_pose(), and t_apply_dead_reckoning().


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