Blender V5.3
draw_intersect.bsl.hh File Reference

Go to the source code of this file.

Classes

struct  IsectPyramid
struct  IsectBox
struct  IsectFrustum
struct  draw::ViewCulling

Namespaces

namespace  draw

Functions

Plane extraction functions.

Intersection library used for culling. Results are meant to be conservative.

float4 isect_plane_setup (float3 p, float3 v1, float3 v2)
IsectPyramid isect_pyramid_setup (Pyramid shape)
IsectBox isect_box_setup (Box shape)
IsectBox isect_box_setup (float3 origin, float3 side_x, float3 side_y, float3 side_z)
IsectFrustum isect_frustum_setup (Frustum shape)
Shape vs. Shape Intersection functions.
bool intersect (IsectPyramid i_pyramid, Box box)
bool intersect (IsectPyramid i_pyramid, IsectBox i_box)
bool intersect (IsectFrustum i_frustum, Pyramid pyramid)
bool intersect (IsectFrustum i_frustum, Box box)
bool intersect (IsectFrustum i_frustum, Sphere sphere)
bool intersect (Cone cone, Sphere sphere)
bool intersect (Circle circle_a, Circle circle_b)

Function Documentation

◆ intersect() [1/7]

bool intersect ( Circle circle_a,
Circle circle_b )

◆ intersect() [2/7]

bool intersect ( Cone cone,
Sphere sphere )

Following "Improve Tile-based Light Culling with Spherical-sliced Cone" by Eric Zhang https://lxjk.github.io/2018/03/25/Improve-Tile-based-Light-Culling-with-Spherical-sliced-Cone.html

Definition at line 523 of file draw_intersect.bsl.hh.

References Cone::angle_cos, Sphere::center, Cone::direction, dot(), intersect(), length(), Sphere::radius, safe_rcp(), saturate, and sqrt.

◆ intersect() [3/7]

bool intersect ( IsectFrustum i_frustum,
Box box )

◆ intersect() [4/7]

◆ intersect() [5/7]

bool intersect ( IsectFrustum i_frustum,
Sphere sphere )

◆ intersect() [6/7]

◆ intersect() [7/7]

bool intersect ( IsectPyramid i_pyramid,
IsectBox i_box )

◆ isect_box_setup() [1/2]

◆ isect_box_setup() [2/2]

IsectBox isect_box_setup ( float3 origin,
float3 side_x,
float3 side_y,
float3 side_z )

Definition at line 85 of file draw_intersect.bsl.hh.

References dot(), isect_box_setup(), and isect_plane_setup().

◆ isect_frustum_setup()

◆ isect_plane_setup()

float4 isect_plane_setup ( float3 p,
float3 v1,
float3 v2 )

v1 and v2 are vectors on the plane. p is a point on the plane.

Definition at line 27 of file draw_intersect.bsl.hh.

References cross, dot(), isect_plane_setup(), and normalize.

Referenced by isect_box_setup(), isect_box_setup(), isect_frustum_setup(), isect_plane_setup(), and isect_pyramid_setup().

◆ isect_pyramid_setup()