Top |
gboolean | xrd_math_clamp_towards_zero_2d () |
void | xrd_math_get_frustum_angles () |
void | xrd_math_get_rotation_angles () |
float | xrd_math_hmd_window_distance () |
gboolean | xrd_math_intersect_lines_2d () |
void | xrd_math_matrix_set_translation_point () |
void | xrd_math_matrix_set_translation_vec () |
float | xrd_math_point_matrix_distance () |
void | xrd_math_sphere_to_3d_coords () |
gboolean xrd_math_clamp_towards_zero_2d (graphene_point_t *min
,graphene_point_t *max
,graphene_point_t *point
,graphene_point_t *clamped
);
void xrd_math_get_frustum_angles (float *left
,float *right
,float *top
,float *bottom
);
Left and bottom are usually negative, top and right usually positive. Exceptions are FOVs where both opposing sides are on the same side of the center view axis (e.g. 2+ viewports per eye).
void xrd_math_get_rotation_angles (graphene_vec3_t *direction
,float *azimuth
,float *inclination
);
Calculate spherical angles from a direction vector with the direction vector's origin as the origin of the sphere.
Note that the distance (sphere radius) is not calculated. For converting between spherical and 3D coordinates, the caller needs to keep track of it.
gboolean xrd_math_intersect_lines_2d (graphene_point_t *p0
,graphene_point_t *p1
,graphene_point_t *p2
,graphene_point_t *p3
,graphene_point_t *intersection
);
void xrd_math_matrix_set_translation_point (graphene_matrix_t *matrix
,graphene_point3d_t *point
);
void xrd_math_matrix_set_translation_vec (graphene_matrix_t *matrix
,graphene_vec3_t *vec
);
float xrd_math_point_matrix_distance (graphene_point3d_t *intersection_point
,graphene_matrix_t *pose
);
void xrd_math_sphere_to_3d_coords (float azimuth
,float inclination
,float distance
,graphene_point3d_t *point
);