|
Blender V5.3
|
Go to the source code of this file.
Functions | |
Math intersection & projection functions. | |
This should ultimately be rewritten inside a gpu_shader lib with higher quality standard. | |
| float4 | plane_from_quad (float3 v0, float3 v1, float3 v2, float3 v3) |
| float4 | plane_from_tri (float3 v0, float3 v1, float3 v2) |
| float | point_plane_projection_dist (float3 line_origin, float3 plane_origin, float3 plane_normal) |
| float | point_line_projection_dist (float2 point, float2 line_origin, float2 line_normal) |
| float | line_plane_intersect_dist (float3 line_origin, float3 line_direction, float3 plane_origin, float3 plane_normal) |
| float | line_plane_intersect_dist (float3 line_origin, float3 line_direction, float4 plane) |
| float3 | line_plane_intersect (float3 line_origin, float3 line_direction, float3 plane_origin, float3 plane_normal) |
| float3 | line_plane_intersect (float3 line_origin, float3 line_direction, float4 plane) |
| float | line_aligned_plane_intersect_dist (float3 line_origin, float3 line_direction, float3 plane_origin) |
| float3 | line_aligned_plane_intersect (float3 line_origin, float3 line_direction, float3 plane_origin) |
| float | line_unit_sphere_intersect_dist (float3 line_origin, float3 line_direction) |
| float | line_unit_box_intersect_dist (float3 line_origin, float3 line_direction) |
| float | line_unit_box_intersect_dist_safe (float3 line_origin, float3 line_direction) |
| float | line_unit_square_intersect_dist (float2 line_origin, float2 line_direction) |
| float | line_unit_square_intersect_dist_safe (float2 line_origin, float2 line_direction) |
| float | line_aabb_clipping_dist (float3 line_origin, float3 line_direction, float3 aabb_min, float3 aabb_max) |
Other useful functions. | |
| void | make_orthonormal_basis (float3 N, float3 &T, float3 &B) |
| float line_aabb_clipping_dist | ( | float3 | line_origin, |
| float3 | line_direction, | ||
| float3 | aabb_min, | ||
| float3 | aabb_max ) |
Returns clipping distance (intersection with the nearest plane) with the given axis-aligned bound box along line_direction. Safe even if line_direction is degenerate. It assumes that an intersection exists (i.e: that line_direction points towards the AABB).
Definition at line 166 of file draw_math_geom.bsl.hh.
References abs, lessThan, line_aabb_clipping_dist(), min, reduce_max(), and select.
Referenced by eevee::film::Film::amend_combined_history(), eevee::dof::setup::stabilize::amend_history(), and line_aabb_clipping_dist().
| float3 line_aligned_plane_intersect | ( | float3 | line_origin, |
| float3 | line_direction, | ||
| float3 | plane_origin ) |
Definition at line 85 of file draw_math_geom.bsl.hh.
References line_aligned_plane_intersect(), and line_aligned_plane_intersect_dist().
Referenced by line_aligned_plane_intersect().
| float line_aligned_plane_intersect_dist | ( | float3 | line_origin, |
| float3 | line_direction, | ||
| float3 | plane_origin ) |
Definition at line 74 of file draw_math_geom.bsl.hh.
References dot(), L, length(), line_aligned_plane_intersect_dist(), and normalize.
Referenced by line_aligned_plane_intersect(), and line_aligned_plane_intersect_dist().
| float3 line_plane_intersect | ( | float3 | line_origin, |
| float3 | line_direction, | ||
| float3 | plane_origin, | ||
| float3 | plane_normal ) |
Definition at line 59 of file draw_math_geom.bsl.hh.
References line_plane_intersect(), and line_plane_intersect_dist().
Referenced by line_plane_intersect(), line_plane_intersect(), and eevee::raytracing::denoise::spatial_main().
Definition at line 68 of file draw_math_geom.bsl.hh.
References line_plane_intersect(), and line_plane_intersect_dist().
| float line_plane_intersect_dist | ( | float3 | line_origin, |
| float3 | line_direction, | ||
| float3 | plane_origin, | ||
| float3 | plane_normal ) |
Definition at line 44 of file draw_math_geom.bsl.hh.
References dot(), and line_plane_intersect_dist().
Referenced by line_plane_intersect(), line_plane_intersect(), line_plane_intersect_dist(), and line_plane_intersect_dist().
Definition at line 52 of file draw_math_geom.bsl.hh.
References dot(), length_squared(), line_plane_intersect_dist(), and float4::w.
Returns minimum intersection distance between the unit box and the line with the assumption that line_origin is contained in the unit box. In other words, it will always returns the farthest intersection.
Definition at line 121 of file draw_math_geom.bsl.hh.
References line_unit_box_intersect_dist(), max, and reduce_min().
Referenced by line_unit_box_intersect_dist(), line_unit_box_intersect_dist_safe(), and eevee::lightprobe::sphere::parallax_eval().
Definition at line 131 of file draw_math_geom.bsl.hh.
References abs, lessThan, line_unit_box_intersect_dist(), line_unit_box_intersect_dist_safe(), max, and select.
Referenced by ScreenSpaceRay::from_start_end(), line_unit_box_intersect_dist_safe(), and eevee::volume::volume_shadow().
Returns intersection distance between the unit sphere and the line with the assumption that line_origin is contained in the unit sphere. It will always returns the farthest intersection.
Definition at line 101 of file draw_math_geom.bsl.hh.
References b, determinant(), dot(), line_unit_sphere_intersect_dist(), and sqrt.
Referenced by line_unit_sphere_intersect_dist(), and eevee::lightprobe::sphere::parallax_eval().
Same as line_unit_box_intersect_dist but for 2D case.
Definition at line 143 of file draw_math_geom.bsl.hh.
References line_unit_square_intersect_dist(), max, and reduce_min().
Referenced by line_unit_square_intersect_dist(), and line_unit_square_intersect_dist_safe().
Definition at line 151 of file draw_math_geom.bsl.hh.
References abs, lessThan, line_unit_square_intersect_dist(), line_unit_square_intersect_dist_safe(), max, and select.
Referenced by eevee::motion_blur::flatten::flatten_comp(), and line_unit_square_intersect_dist_safe().
Definition at line 187 of file draw_math_geom.bsl.hh.
References abs, B, cross, make_orthonormal_basis(), N, normalize, and T.
Referenced by LightShape::get(), make_orthonormal_basis(), eevee::shadow_ray_generate_punctual(), and eevee::light::shape_display_light_position_get().
Definition at line 22 of file draw_math_geom.bsl.hh.
References cross, dot(), normalize, and plane_from_quad().
Referenced by plane_from_quad().
Definition at line 28 of file draw_math_geom.bsl.hh.
References cross, dot(), normalize, and plane_from_tri().
Referenced by plane_from_tri().
Definition at line 39 of file draw_math_geom.bsl.hh.
References dot(), and point_line_projection_dist().
Referenced by eevee::motion_blur::dilate::MotionLine::is_inside_motion_line(), and point_line_projection_dist().
Definition at line 34 of file draw_math_geom.bsl.hh.
References dot(), and point_plane_projection_dist().
Referenced by point_plane_projection_dist().