|
Untitled
|
Go to the source code of this file.
Macros | |
| #define | MAX(a, b) |
| #define | MIN(a, b) |
Functions | |
| int | round_up_power_of_two (int a, int max) |
| float | smoothstep (float a, float b, float c) |
| vec2 | vec2_normalize (vec2 v) |
| vec3 | vec3_normalize (vec3 v) |
| vec4 | vec4_normalize (vec4 v) |
| vec3 | ivec3_normalize (ivec3 a) |
| vec3 | vec3_cross (vec3 a, vec3 b) |
| mat3 | rotation_matrix_r (vec3 right, vec3 up, vec3 forward) |
| bool | m9_inverse (float inverse[9][9], float mat[9][9]) |
| bool | m4_inverse (float out[16], const float m[16]) |
| vec2 | vec2_scale (vec2 a, float b) |
| vec3 | vec3_scale (vec3 a, float b) |
| vec4 | vec4_scale (vec4 a, float b) |
| float | ivec3_dist (ivec3 a, ivec3 b) |
| ivec3 | ivec3_sub (ivec3 a, ivec3 b) |
| vec3 | vec3_sub (vec3 a, vec3 b) |
| vec2 | vec2_sub (vec2 a, vec2 b) |
| vec2 | vec2_add (vec2 a, vec2 b) |
| ivec3 | ivec3_add (ivec3 a, ivec3 b) |
| vec3 | ivec3_scale (ivec3 a, float b) |
| vec3 | vec3_add (vec3 a, vec3 b) |
| vec4 | vec4_add (vec4 a, vec4 b) |
| vec4 | vec4_sub (vec4 a, vec4 b) |
| vec3 | vec3_mul (vec3 a, vec3 b) |
| vec4 | vec4_mul (vec4 a, vec4 b) |
| vec3 | vec3_div (vec3 a, vec3 b) |
| float | vec3_dist2 (vec3 a, vec3 b) |
| float | vec3_dist2x2 (vec3 a, vec3 b) |
| float | vec3_dist (vec3 a, vec3 b) |
| float | vec3_dot (vec3 a, vec3 b) |
| float | vec2_dot (vec2 a, vec2 b) |
| float | vec3_length (vec3 v) |
| float | vec4_length (vec4 v) |
| float | vec2_length (vec2 v) |
| mat4 | mat4_inverse (mat4 in) |
| float | lerp (float a, float b, float t) |
| vec3 | vec3_lerp (vec3 a, vec3 b, float t) |
| float | clamp (float a, float b, float c) |
| vec4 | mul_m4_v4 (mat4 m, vec4 v) |
| vec4 | mul_m4_v4r (mat4 m, vec4 v) |
| mat4 | m4_mul (mat4 a, mat4 b) |
| void | mat4_mul (float out[16], const float a[16], const float b[16]) |
| uint32_t | expand_bits (uint32_t v) |
| uint32_t | morton (uint32_t x, uint32_t y, uint32_t z) |
| #define MAX | ( | a, | |
| b ) |
Definition at line 433 of file mathf.h.
Referenced by assign_uvs(), bake_audio_probe_volume(), find_depth(), generate_synthetic_IR_tail(), GPU_upload_singular_text_box(), process_probe_chunk(), process_ui_event(), solve_Q(), update_leg(), update_skeleton(), and vec3_max().
| #define MIN | ( | a, | |
| b ) |
Definition at line 435 of file mathf.h.
Referenced by bake_lightmap(), calculate_stride_governor(), clip_manifold(), GPU_upload_singular_text_box(), load_texture(), process_probe_chunk(), process_ui_event(), solve_Q(), update_leg(), and vec3_min().
|
inline |
Definition at line 11 of file mathf.h.
References round_up_power_of_two().
Referenced by allocate_audio_scratch_hrtf(), and round_up_power_of_two().
|
inline |
Definition at line 27 of file mathf.h.
References smoothstep().
Referenced by main(), smoothstep(), and vignette().
Definition at line 38 of file mathf.h.
References vec2_normalize(), vec2::x, and vec2::y.
Referenced by render_text_menu(), render_ui_menu(), update_leg(), and vec2_normalize().
Definition at line 46 of file mathf.h.
References vec3_normalize(), vec3::x, vec3::y, and vec3::z.
Referenced by apply_planet_velocity(), apply_velocity(), build_light_bvh(), build_uv_islands(), check_lighting_pv(), compute_camera_basis(), compute_hull_faces(), compute_tri_normal(), compute_triangle_normal(), define_M(), find_least_parallel_axis(), init_globals(), interpolate_nearest_aprobes(), load_gltf(), obb_orthonormalize(), player_find_collision(), precompute_ssao_kernel(), process_collision_node(), ray_intersects_obb_with_point(), render_light_menu(), render_mat4_widget(), setup_initial_hull_points(), support_capsule(), update_audio_occlusion(), update_body_from_legs(), update_leg(), update_light_camera(), update_physics_components(), update_skeleton(), and vec3_normalize().
Definition at line 55 of file mathf.h.
References vec4_normalize(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by update_physics_components(), and vec4_normalize().
Definition at line 69 of file mathf.h.
References ivec3_normalize(), ivec3::x, vec3::x, ivec3::y, vec3::y, ivec3::z, and vec3::z.
Referenced by ivec3_normalize().
Definition at line 80 of file mathf.h.
References vec3_cross(), vec3::x, vec3::y, and vec3::z.
Referenced by clip_manifold(), compute_3d_barycentric(), compute_camera_basis(), compute_hull_faces(), compute_tri_normal(), compute_triangle_normal(), define_M(), find_least_parallel_axis(), find_next_direction(), mat4_inverse(), obb_orthonormalize(), PC_resolve_impulse(), PC_resolve_impulse_static(), perform_clip(), player_resolve_impulse(), player_resolve_impulse_static(), ray_intersects_triangle(), setup_initial_hull_points(), update_light_camera(), update_physics_components(), and vec3_cross().
|
inline |
Definition at line 108 of file mathf.h.
References m9_inverse(), and temp.
Referenced by m9_inverse().
|
inline |
Definition at line 164 of file mathf.h.
References m4_inverse().
Referenced by bake_reflection_probes(), clip_manifold(), determine_aabb_of_children(), GPU_upload_scene_data(), load_gltf(), m4_inverse(), PC_traverse_scene_bvh(), player_find_collision(), process_collision_node(), ray_traverse_scene_bvh(), search_collisions_from_hull(), search_collisions_from_pc(), and update_camera().
Definition at line 244 of file mathf.h.
References vec2_scale(), vec2::x, and vec2::y.
Referenced by compute_slider_bounds(), fbm_noise(), scroll_container(), SDF_rect(), update_ui_state(), and vec2_scale().
Definition at line 248 of file mathf.h.
References vec3_scale(), vec3::x, vec3::y, and vec3::z.
Referenced by apply_planet_velocity(), apply_velocity(), build_light_bvh(), build_uv_islands(), calculate_stride_governor(), clip_against_plane(), clip_manifold(), clip_pts_against_plane(), clip_tri_against_plane(), closest_point_segment(), closest_point_triangle(), compute_camera_basis(), define_M(), epa(), fbm(), fbm_noise(), find_closest_visible_aportal(), find_next_direction(), generate_capsule_hull_manifold(), OBB_min_corner(), obb_orthonormalize(), obb_to_vertices(), pathfind_audio_occlusion(), PC_apply_velocity(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_resolve_impulse(), player_resolve_impulse_static(), pos_to_pv_local(), precompute_fbm_texture(), precompute_ssao_kernel(), process_input(), project_point_plane(), PV_step_size(), ray_intersects_aabb_with_point(), ray_intersects_obb_with_point(), ray_intersects_triangle(), recalculate_audio_portal_paths(), render_probe_volume(), resolve_collisions(), segment_plane_distance(), setup_initial_hull_points(), support_capsule(), support_diff(), triangle_centroid(), update_angular_spring(), update_body_from_legs(), update_leg(), update_light_camera(), update_physics_components(), update_skeleton(), update_spring(), vec3_lerp(), and vec3_scale().
Definition at line 252 of file mathf.h.
References vec4_scale(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by fbm_noise(), perm(), and vec4_scale().
Definition at line 257 of file mathf.h.
References ivec3_dist(), ivec3::x, ivec3::y, and ivec3::z.
Referenced by ivec3_dist().
Definition at line 262 of file mathf.h.
References ivec3_sub(), ivec3::x, ivec3::y, and ivec3::z.
Referenced by ivec3_sub().
Definition at line 266 of file mathf.h.
References vec3_sub(), vec3::x, vec3::y, and vec3::z.
Referenced by a_star_aportal(), add_horizon_face_to_hull_faces(), assign_uvs(), check_audio_pv(), check_face_visibility(), check_lighting_pv(), clip_against_plane(), clip_manifold(), clip_pts_against_plane(), clip_tri_against_plane(), closest_point_segment(), closest_point_triangle(), collision(), compute_3d_barycentric(), compute_camera_basis(), compute_tri_normal(), compute_triangle_normal(), define_M(), determine_closest_rprobes(), determine_light_visibility_per_mesh(), epa(), EPA_add_horizon_face_to_hull_faces(), EPA_check_face_visibility(), fbm_noise(), find_closest_visible_aportal(), find_next_direction(), generate_capsule_hull_manifold(), incremental_hull(), interpolate_nearest_aprobes(), obb_orthonormalize(), pathfind_audio_occlusion(), PC_resolve_impulse(), PC_resolve_impulse_static(), perform_clip(), player_find_collision(), player_resolve_impulse(), player_resolve_impulse_static(), point_in_obb(), point_in_triangle(), point_triangle_distance(), pos_to_pv_local(), process_sdl_event(), project_point_plane(), ray_intersects_obb_with_point(), ray_intersects_triangle(), ray_traverse_scene_bvh(), recalculate_audio_portal_paths(), render(), segment_plane_distance(), setup_initial_hull_points(), solve_Q(), support_diff(), test_sphere_aabb(), update_angular_spring(), update_audio_occlusion(), update_body_from_legs(), update_leg(), update_light_camera(), update_physics_components(), update_skeleton(), update_spring(), vec3_dist(), vec3_dist2(), vec3_dist2x2(), vec3_lerp(), and vec3_sub().
Definition at line 270 of file mathf.h.
References vec2_sub(), vec2::x, and vec2::y.
Referenced by calculate_stride_governor(), compute_slider_bounds(), GPU_upload_singular_element(), screenspace_to_ui_element_local(), scroll_container(), SDF_circle(), SDF_rect(), update_ui_state(), and vec2_sub().
Definition at line 274 of file mathf.h.
References vec2_add(), vec2::x, and vec2::y.
Referenced by compute_slider_bounds(), fbm_noise(), get_text_box_from_coords(), scroll_container(), SDF_rect(), update_ui_state(), and vec2_add().
Definition at line 278 of file mathf.h.
References ivec3_add(), ivec3::x, ivec3::y, and ivec3::z.
Referenced by ivec3_add().
Definition at line 282 of file mathf.h.
References ivec3_scale(), ivec3::x, ivec3::y, and ivec3::z.
Referenced by ivec3_scale().
Definition at line 286 of file mathf.h.
References vec3_add(), vec3::x, vec3::y, and vec3::z.
Referenced by aabb_to_vertices(), bake_reflection_probes(), build_uv_islands(), calculate_stride_governor(), clip_against_plane(), clip_pts_against_plane(), clip_tri_against_plane(), closest_point_segment(), closest_point_triangle(), compute_camera_basis(), epa(), fbm(), find_next_direction(), init_player(), OBB_min_corner(), obb_to_vertices(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_resolve_impulse(), player_resolve_impulse_static(), pos_to_pv_local(), process_input(), ray_intersects_aabb_with_point(), ray_intersects_obb_with_point(), ray_intersects_triangle(), render(), render_probe_volume(), resolve_collisions(), segment_plane_distance(), setup_initial_hull_points(), solve_Q(), support_capsule(), transform_aabb_by_position(), translate_aabb(), triangle_centroid(), update_angular_spring(), update_body_from_legs(), update_camera(), update_leg(), update_light_camera(), update_physics_components(), update_skeleton(), update_spring(), vec3_add(), vec3_lerp(), and write_point_light_shadows().
Definition at line 290 of file mathf.h.
References vec4_add(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by fbm_noise(), get_view_planes(), perm(), and vec4_add().
Definition at line 294 of file mathf.h.
References vec4_sub(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by get_view_planes(), and vec4_sub().
Definition at line 298 of file mathf.h.
References vec3_mul(), vec3::x, vec3::y, and vec3::z.
Referenced by fbm_noise(), init_player(), and vec3_mul().
Definition at line 302 of file mathf.h.
References vec4_mul(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by perm(), and vec4_mul().
Definition at line 306 of file mathf.h.
References vec3_div(), vec3::x, vec3::y, and vec3::z.
Referenced by pos_to_pv_local(), and vec3_div().
Definition at line 310 of file mathf.h.
References vec3_dist2(), vec3_sub(), vec3::x, vec3::y, and vec3::z.
Referenced by vec3_dist2().
Definition at line 314 of file mathf.h.
References vec3_dist2x2(), vec3_sub(), vec3::x, vec3::y, and vec3::z.
Referenced by vec3_dist2x2().
Definition at line 318 of file mathf.h.
References vec3_dist(), vec3_sub(), vec3::x, vec3::y, and vec3::z.
Referenced by check_lighting_pv(), setup_initial_hull_points(), update_leg(), update_player_audio_probe(), and vec3_dist().
Definition at line 322 of file mathf.h.
References vec3_dot(), vec3::x, vec3::y, and vec3::z.
Referenced by aabb_in_frustum(), add_horizon_face_to_hull_faces(), assign_uvs(), calculate_camera_angles(), check_face_visibility(), clip_against_plane(), clip_manifold(), clip_pts_against_plane(), clip_tri_against_plane(), closest_point_segment(), closest_point_triangle(), compute_hull_faces(), define_M(), epa(), EPA_add_horizon_face_to_hull_faces(), EPA_check_face_visibility(), find_least_parallel_axis(), find_next_direction(), generate_capsule_hull_manifold(), GJK(), incremental_hull(), is_similar_plane(), make_look_at(), mat4_inverse(), obb_orthonormalize(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_resolve_impulse(), player_resolve_impulse_static(), point_in_triangle(), project_point_plane(), ray_intersects_obb_with_point(), ray_intersects_triangle(), ray_traverse_mesh_bvh(), rot(), segment_plane_distance(), setup_initial_hull_points(), solve_Q(), support(), support_capsule(), test_sphere_aabb(), update_light_camera(), update_physics_components(), vec3_dot(), and walk_coplanar_adjacency().
Definition at line 325 of file mathf.h.
References vec2_dot(), vec2::x, and vec2::y.
Referenced by update_ui_state(), and vec2_dot().
|
inline |
Definition at line 328 of file mathf.h.
References vec3_length(), vec3::x, vec3::y, and vec3::z.
Referenced by a_star_aportal(), check_audio_pv(), clip_tri_against_plane(), collision(), compute_3d_barycentric(), determine_closest_rprobes(), determine_light_visibility_per_mesh(), epa(), EPA_add_horizon_face_to_hull_faces(), find_closest_visible_aportal(), find_next_direction(), interpolate_nearest_aprobes(), pathfind_audio_occlusion(), PC_resolve_impulse(), PC_resolve_impulse_static(), perform_clip(), player_resolve_impulse(), point_triangle_distance(), process_sdl_event(), ray_traverse_scene_bvh(), recalculate_audio_portal_paths(), setup_initial_hull_points(), support_capsule(), update_audio_occlusion(), update_camera(), update_leg(), update_physics_components(), update_skeleton(), and vec3_length().
|
inline |
Definition at line 332 of file mathf.h.
References vec4_length(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by build_light_bvh(), and vec4_length().
|
inline |
Definition at line 336 of file mathf.h.
References vec2_length(), vec2::x, and vec2::y.
Referenced by calculate_stride_governor(), compute_slider_bounds(), SDF_circle(), SDF_rect(), and vec2_length().
Definition at line 340 of file mathf.h.
References mat4::a0, mat4::a1, mat4::a2, mat4::a3, mat4::b0, mat4::b1, mat4::b2, mat4::b3, mat4::c0, mat4::c1, mat4::c2, mat4::c3, mat4::d0, mat4::d1, mat4::d2, mat4::d3, mat4_inverse(), vec3_cross(), vec3_dot(), vec3::x, vec3::y, and vec3::z.
Referenced by clip_manifold(), and mat4_inverse().
|
inline |
Definition at line 372 of file mathf.h.
References lerp().
Referenced by lerp(), precompute_ssao_kernel(), sample_animation(), scroll_container(), and update_animation_components().
Definition at line 375 of file mathf.h.
References vec3_add(), vec3_lerp(), vec3_scale(), and vec3_sub().
Referenced by render_tree(), update_animation_components(), update_leg(), and vec3_lerp().
|
inline |
Definition at line 379 of file mathf.h.
References clamp().
Referenced by ACESFilm(), calculate_attenuation(), calculate_specular_occlusion(), CalculateAttenuation(), calculateExposure(), clamp(), closest_point_on_aabb(), closest_point_segment(), get_cluster_index(), main(), normal_filtering(), parallax_mapping(), ParallaxMapping(), PC_resolve_impulse(), PC_resolve_impulse_static(), player_resolve_impulse(), query_audio_probe(), render_light_menu(), sample_weighted_rprobes(), solve_light_source(), solve_light_source(), test_sphere_aabb(), update_leg(), and vec3_clamp().
Definition at line 383 of file mathf.h.
References mat4::a0, mat4::a1, mat4::a2, mat4::a3, mat4::b0, mat4::b1, mat4::b2, mat4::b3, mat4::c0, mat4::c1, mat4::c2, mat4::c3, mat4::d0, mat4::d1, mat4::d2, mat4::d3, mul_m4_v4(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by m4_mul(), mat4_mul_direction(), mat4_mul_point(), and mul_m4_v4().
Definition at line 392 of file mathf.h.
References mat4::a0, mat4::a1, mat4::a2, mat4::a3, mat4::b0, mat4::b1, mat4::b2, mat4::b3, mat4::c0, mat4::c1, mat4::c2, mat4::c3, mat4::d0, mat4::d1, mat4::d2, mat4::d3, mul_m4_v4r(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by mat4_mul_pointr(), and mul_m4_v4r().
Definition at line 401 of file mathf.h.
References mat4::a0, mat4::a1, mat4::a2, mat4::a3, mat4::b0, mat4::b1, mat4::b2, mat4::b3, mat4::c0, mat4::c1, mat4::c2, mat4::c3, mat4::d0, mat4::d1, mat4::d2, mat4::d3, m4_mul(), mul_m4_v4(), vec4::w, vec4::x, vec4::y, and vec4::z.
Referenced by compose_trs_from_mesh_node(), compose_trs_from_vectors(), compute_node_globals_recursive(), get_view_planes(), m4_mul(), update_node_global(), update_skin_matrices(), and write_point_light_shadows().
|
inline |
|
inline |
Definition at line 438 of file mathf.h.
References expand_bits().
Referenced by expand_bits(), and morton().
|
inline |
Definition at line 447 of file mathf.h.
References expand_bits(), and morton().
Referenced by morton().