|
Fixed | gf_angle_diff (Fixed a, Fixed b) |
|
u32 | gf_get_bit_size (u32 MaxVal) |
| Field bit-size.
|
|
u32 | gf_get_next_pow2 (u32 val) |
| Get power of 2.
|
|
Fixed | gf_v2d_len (GF_Point2D *vec) |
| get 2D vector length
|
|
Fixed | gf_v2d_distance (GF_Point2D *a, GF_Point2D *b) |
| get distance between 2 points
|
|
GF_Point2D | gf_v2d_from_polar (Fixed length, Fixed angle) |
| 2D vector from polar coordinates
|
|
void | gf_rect_union (GF_Rect *rc1, GF_Rect *rc2) |
| rectangle union
|
|
GF_Rect | gf_rect_center (Fixed w, Fixed h) |
| centers a rectangle
|
|
Bool | gf_rect_overlaps (GF_Rect rc1, GF_Rect rc2) |
| rectangle overlap test
|
|
Bool | gf_rect_equal (GF_Rect *rc1, GF_Rect *rc2) |
| rectangle identity test
|
|
void | gf_rect_intersect (GF_Rect *rc1, GF_Rect *rc2) |
| rectangle intersection
|
|
GF_IRect | gf_rect_pixelize (GF_Rect *r) |
| gets the pixelized version of a rectangle
|
|
void | gf_irect_union (GF_IRect *rc1, GF_IRect *rc2) |
|
void | gf_mx2d_add_matrix (GF_Matrix2D *_this, GF_Matrix2D *from) |
| 2D matrix multiplication
|
|
void | gf_mx2d_pre_multiply (GF_Matrix2D *_this, GF_Matrix2D *from) |
| 2D matrix pre-multiplication
|
|
void | gf_mx2d_add_translation (GF_Matrix2D *_this, Fixed cx, Fixed cy) |
| matrix translating
|
|
void | gf_mx2d_add_rotation (GF_Matrix2D *_this, Fixed cx, Fixed cy, Fixed angle) |
| matrix rotating
|
|
void | gf_mx2d_add_scale (GF_Matrix2D *_this, Fixed scale_x, Fixed scale_y) |
| matrix scaling
|
|
void | gf_mx2d_add_scale_at (GF_Matrix2D *_this, Fixed scale_x, Fixed scale_y, Fixed cx, Fixed cy, Fixed angle) |
| matrix uncentered scaling
|
|
void | gf_mx2d_add_skew (GF_Matrix2D *_this, Fixed skew_x, Fixed skew_y) |
| matrix skewing
|
|
void | gf_mx2d_add_skew_x (GF_Matrix2D *_this, Fixed angle) |
| matrix horizontal skewing
|
|
void | gf_mx2d_add_skew_y (GF_Matrix2D *_this, Fixed angle) |
| matrix vertical skewing
|
|
void | gf_mx2d_inverse (GF_Matrix2D *_this) |
| matrix inversing
|
|
void | gf_mx2d_apply_coords (GF_Matrix2D *_this, Fixed *x, Fixed *y) |
| matrix coordinate transformation
|
|
void | gf_mx2d_apply_point (GF_Matrix2D *_this, GF_Point2D *pt) |
| matrix point transformation
|
|
void | gf_mx2d_apply_rect (GF_Matrix2D *_this, GF_Rect *rc) |
| matrix rectangle transformation
|
|
Bool | gf_mx2d_decompose (GF_Matrix2D *_this, GF_Point2D *scale, Fixed *rotate, GF_Point2D *translate) |
| matrix decomposition
|
|
Fixed | gf_vec_len (GF_Vec v) |
| get 3D vector length
|
|
Fixed | gf_vec_len_p (GF_Vec *v) |
| get 3D vector length
|
|
Fixed | gf_vec_lensq (GF_Vec v) |
| get 3D vector square length
|
|
Fixed | gf_vec_lensq_p (GF_Vec *v) |
| get 3D vector square length
|
|
Fixed | gf_vec_dot (GF_Vec v1, GF_Vec v2) |
| get 3D vector dot product
|
|
Fixed | gf_vec_dot_p (GF_Vec *v1, GF_Vec *v2) |
| get 3D vector dot product
|
|
void | gf_vec_norm (GF_Vec *v) |
| vector normalization
|
|
GF_Vec | gf_vec_scale (GF_Vec v, Fixed f) |
| vector scaling
|
|
GF_Vec | gf_vec_scale_p (GF_Vec *v, Fixed f) |
| vector scaling
|
|
GF_Vec | gf_vec_cross (GF_Vec v1, GF_Vec v2) |
| vector cross product
|
|
GF_Vec | gf_vec_cross_p (GF_Vec *v1, GF_Vec *v2) |
| vector cross product
|
|
GF_Vec4 | gf_quat_to_rotation (GF_Vec4 *quat) |
| quaternion to rotation
|
|
GF_Vec4 | gf_quat_from_rotation (GF_Vec4 rot) |
| quaternion from rotation
|
|
GF_Vec4 | gf_quat_get_inv (GF_Vec4 *quat) |
|
GF_Vec4 | gf_quat_multiply (GF_Vec4 *q1, GF_Vec4 *q2) |
| quaternion multiplication
|
|
GF_Vec | gf_quat_rotate (GF_Vec4 *quat, GF_Vec *vec) |
| quaternion vector rotating
|
|
GF_Vec4 | gf_quat_from_axis_cos (GF_Vec axis, Fixed cos_a) |
| quaternion from axis and cos
|
|
GF_Vec4 | gf_quat_slerp (GF_Vec4 q1, GF_Vec4 q2, Fixed frac) |
| quaternion interpolation
|
|
void | gf_bbox_refresh (GF_BBox *b) |
|
void | gf_bbox_from_rect (GF_BBox *box, GF_Rect *rc) |
|
void | gf_rect_from_bbox (GF_Rect *rc, GF_BBox *box) |
|
void | gf_bbox_grow_point (GF_BBox *box, GF_Vec pt) |
| bounding box expansion
|
|
void | gf_bbox_union (GF_BBox *b1, GF_BBox *b2) |
|
Bool | gf_bbox_equal (GF_BBox *b1, GF_BBox *b2) |
|
Bool | gf_bbox_point_inside (GF_BBox *box, GF_Vec *p) |
|
void | gf_bbox_get_vertices (GF_Vec bmin, GF_Vec bmax, GF_Vec *vecs) |
| get box vertices
|
|
void | gf_mx_from_mx2d (GF_Matrix *mx, GF_Matrix2D *mat2D) |
| matrix constructor from 2D
|
|
Bool | gf_mx_equal (GF_Matrix *mx1, GF_Matrix *mx2) |
| matrix equality testing
|
|
void | gf_mx_add_translation (GF_Matrix *mx, Fixed tx, Fixed ty, Fixed tz) |
| matrix translation
|
|
void | gf_mx_add_scale (GF_Matrix *mx, Fixed sx, Fixed sy, Fixed sz) |
| matrix scaling
|
|
void | gf_mx_add_rotation (GF_Matrix *mx, Fixed angle, Fixed x, Fixed y, Fixed z) |
| matrix rotating
|
|
void | gf_mx_add_matrix (GF_Matrix *mx, GF_Matrix *mul) |
| matrices multiplication
|
|
void | gf_mx_add_matrix_2d (GF_Matrix *mx, GF_Matrix2D *mat2D) |
| 2D matrix multiplication
|
|
void | gf_mx_inverse (GF_Matrix *mx) |
| affine matrix inversion
|
|
void | gf_mx_transpose (GF_Matrix *mx) |
| transpose 4x4 matrix
|
|
void | gf_mx_apply_vec (GF_Matrix *mx, GF_Vec *pt) |
| matrix point transformation
|
|
void | gf_mx_apply_rect (GF_Matrix *_this, GF_Rect *rc) |
| matrix rectangle transformation
|
|
void | gf_mx_ortho (GF_Matrix *mx, Fixed left, Fixed right, Fixed bottom, Fixed top, Fixed z_near, Fixed z_far) |
| ortho matrix construction
|
|
void | gf_mx_ortho_reverse_z (GF_Matrix *mx, Fixed left, Fixed right, Fixed bottom, Fixed top, Fixed z_near, Fixed z_far) |
| ortho matrix with reverse Z construction
|
|
void | gf_mx_perspective (GF_Matrix *mx, Fixed fov, Fixed aspect_ratio, Fixed z_near, Fixed z_far) |
| perspective matrix construction
|
|
void | gf_mx_perspective_reverse_z (GF_Matrix *mx, Fixed fov, Fixed aspect_ratio, Fixed z_near, Fixed z_far) |
| perspective matrix with reverse Z construction
|
|
void | gf_mx_lookat (GF_Matrix *mx, GF_Vec position, GF_Vec target, GF_Vec up_vector) |
| creates look matrix
|
|
void | gf_mx_apply_bbox (GF_Matrix *mx, GF_BBox *b) |
| matrix box transformation
|
|
void | gf_mx_apply_bbox_4x4 (GF_Matrix *mx, GF_BBox *b) |
| matrix box transformation
|
|
void | gf_mx_apply_bbox_sphere (GF_Matrix *mx, GF_BBox *box) |
| matrix box sphere transformation
|
|
void | gf_mx_add_matrix_4x4 (GF_Matrix *mat, GF_Matrix *mul) |
| non-affine matrix multiplication
|
|
Bool | gf_mx_inverse_4x4 (GF_Matrix *mx) |
| non-affine matrix inversion
|
|
void | gf_mx_apply_vec_4x4 (GF_Matrix *mx, GF_Vec4 *vec) |
| matrix 4D vector transformation
|
|
void | gf_mx_get_yaw_pitch_roll (GF_Matrix *mx, Fixed *yaw, Fixed *pitch, Fixed *roll) |
| matrix yaw pitch roll decomposition
|
|
void | gf_mx_decompose (GF_Matrix *mx, GF_Vec *translate, GF_Vec *scale, GF_Vec4 *rotate, GF_Vec *shear) |
| matrix decomposition
|
|
void | gf_mx_rotate_vector (GF_Matrix *mx, GF_Vec *pt) |
| matrix vector rotation
|
|
void | gf_mx_rotation_matrix_from_vectors (GF_Matrix *mx, GF_Vec x_axis, GF_Vec y_axis, GF_Vec z_axis) |
| matrix initialization from vectors
|
|
void | gf_mx2d_from_mx (GF_Matrix2D *mx2d, GF_Matrix *mx) |
| matrix to 2D matrix
|
|
void | gf_mx_apply_plane (GF_Matrix *mx, GF_Plane *plane) |
| matrix plane transformation
|
|
Fixed | gf_plane_get_distance (GF_Plane *plane, GF_Vec *p) |
| point to plane distance
|
|
GF_Vec | gf_closest_point_to_line (GF_Vec line_pt, GF_Vec line_vec, GF_Vec pt) |
| closest point on a line
|
|
u32 | gf_plane_get_p_vertex_idx (GF_Plane *p) |
| box p-vertex index
|
|
Bool | gf_plane_intersect_line (GF_Plane *plane, GF_Vec *linepoint, GF_Vec *linevec, GF_Vec *outPoint) |
| plane line intersection
|
|
u32 | gf_bbox_plane_relation (GF_BBox *box, GF_Plane *p) |
| box-plane relation
|
|
GF_Ray | gf_ray (GF_Vec start, GF_Vec end) |
| ray constructor
|
|
void | gf_mx_apply_ray (GF_Matrix *mx, GF_Ray *r) |
| matrix ray transformation
|
|
Bool | gf_ray_hit_box (GF_Ray *ray, GF_Vec min_edge, GF_Vec max_edge, GF_Vec *out_point) |
| ray box intersection test
|
|
Bool | gf_ray_hit_sphere (GF_Ray *ray, GF_Vec *center, Fixed radius, GF_Vec *out_point) |
| ray sphere intersection test
|
|
Bool | gf_ray_hit_triangle (GF_Ray *ray, GF_Vec *v0, GF_Vec *v1, GF_Vec *v2, Fixed *dist) |
| ray triangle intersection test
|
|
Mathematics and Trigonometric.
>