Blender V5.3
ObjectBounds Struct Reference

#include <draw_shader_shared.hh>

Public Member Functions

float inner_sphere_radius () const
void inner_sphere_radius_set (float value)
ObjectBounds
void sync ()
void sync (const Object &ob, float inflate_bounds=0.0f)
void sync (const float3 &center, const float3 &size)

Public Attributes

float4 bounding_corners [4]
float4 bounding_sphere

Detailed Description

Definition at line 503 of file draw_shader_shared.hh.

Member Function Documentation

◆ inner_sphere_radius()

float ObjectBounds::inner_sphere_radius ( ) const
inline

Radius of the inscribed sphere derived from the bounding corner. Computed on GPU.

Definition at line 512 of file draw_shader_shared.hh.

References bounding_corners.

Referenced by eevee::shadow::comp_main(), and draw::visibility().

◆ inner_sphere_radius_set()

void ObjectBounds::inner_sphere_radius_set ( float value)
inline

Definition at line 516 of file draw_shader_shared.hh.

References bounding_corners.

Referenced by draw::resource_finalize_main().

◆ sync() [1/3]

void ObjectBounds::sync ( )
inline

Definition at line 201 of file draw_resource.hh.

References bounding_corners, bounding_sphere, and NAN_FLT.

Referenced by blender::draw::Manager::resource_handle().

◆ sync() [2/3]

void ObjectBounds::sync ( const float3 & center,
const float3 & size )
inline

Definition at line 247 of file draw_resource.hh.

References bounding_corners, and bounding_sphere.

◆ sync() [3/3]

void ObjectBounds::sync ( const Object & ob,
float inflate_bounds = 0.0f )
inline

Member Data Documentation

◆ bounding_corners

float4 ObjectBounds::bounding_corners[4]

Uploaded as vertex (0, 4, 3, 1) of the bbox in local space, matching XYZ axis order. Then processed by GPU and stored as (0, 4-0, 3-0, 1-0) in world space for faster culling.

Definition at line 508 of file draw_shader_shared.hh.

Referenced by eevee::shadow::comp_main(), workbench::shadow::visibility::culling_main(), inner_sphere_radius(), inner_sphere_radius_set(), draw::resource_finalize_main(), eevee::lightprobe::volume::scene_bounds(), sync(), sync(), sync(), eevee::shadow::tag_update_vert(), eevee::shadow::usage::tag_usage_vert(), eevee::shadow::tilemap_bounds_min_max(), and draw::visibility().

◆ bounding_sphere

float4 ObjectBounds::bounding_sphere

Bounding sphere derived from the bounding corner. Computed on GPU.

Definition at line 510 of file draw_shader_shared.hh.

Referenced by eevee::shadow::comp_main(), drw_bounds_are_valid(), drw_bounds_corners_are_valid(), draw::resource_finalize_main(), sync(), sync(), sync(), eevee::shadow::tag_update_vert(), and draw::visibility().


The documentation for this struct was generated from the following files: