![]() |
![]() |
![]() |
![]() |
float xrd_math_point_matrix_distance (graphene_point3d_t *intersection_point
,graphene_matrix_t *pose
);
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.
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
);
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
);
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_sphere_to_3d_coords (float azimuth
,float inclination
,float distance
,graphene_point3d_t *point
);