MCPcopy Create free account
hub / github.com/Ipotrick/Daxa / contains

Method contains

src/cpp_wrapper.cpp:2224–2240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2222 // --- Begin Misc ---
2223
2224 auto ImageMipArraySlice::contains(ImageMipArraySlice const & slice) const -> bool
2225 {
2226 u32 const a_mip_p0 = this->base_mip_level;
2227 u32 const a_mip_p1 = this->base_mip_level + this->level_count - 1;
2228 u32 const b_mip_p0 = slice.base_mip_level;
2229 u32 const b_mip_p1 = slice.base_mip_level + slice.level_count - 1;
2230
2231 u32 const a_arr_p0 = this->base_array_layer;
2232 u32 const a_arr_p1 = this->base_array_layer + this->layer_count - 1;
2233 u32 const b_arr_p0 = slice.base_array_layer;
2234 u32 const b_arr_p1 = slice.base_array_layer + slice.layer_count - 1;
2235
2236 return b_mip_p0 >= a_mip_p0 &&
2237 b_mip_p1 <= a_mip_p1 &&
2238 b_arr_p0 >= a_arr_p0 &&
2239 b_arr_p1 <= a_arr_p1;
2240 }
2241 auto ImageMipArraySlice::intersects(ImageMipArraySlice const & slice) const -> bool
2242 {
2243 u32 const a_mip_p0 = this->base_mip_level;

Callers 15

register_imageMethod · 0.80
create_buffer_helperFunction · 0.80
create_task_imageMethod · 0.80
add_taskMethod · 0.80
resource_viewer_uiFunction · 0.80
pin_resource_checkboxFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected