|
Unravel Engine C++ Reference
|
Retained per-model render proxy data used by the culling/LOD code. More...
#include <render_proxy.h>
Public Member Functions | |
| void | clear () |
| void | begin_refresh (size_t submesh_count) |
| void | add_instance_bounds (uint32_t submesh_index, const math::bbox &world_bounds) |
| auto | get_instance_bounds (uint32_t submesh_index, size_t instance_index) const -> const math::bbox * |
| Gets the cached world bounds for a (submesh, instance) pair. | |
| auto | get_skinned_bounds (uint32_t submesh_index) const -> const math::bbox * |
| Gets the cached animated world bounds for a skinned submesh. | |
| auto | has_animated_bounds () const -> bool |
| auto | has_instance_bounds () const -> bool |
| auto | has_pose_bounds () const -> bool |
Public Attributes | |
| hpp::small_vector< hpp::small_vector< math::bbox > > | instance_bounds |
| std::vector< math::bbox > | skinned_bounds |
| Cached world-space animated bounds per skinned submesh index. | |
| math::bbox | animated_bounds |
| math::bbox | instance_bounds_union |
| uint64_t | version {0} |
| Increments on every refresh so consumers can detect staleness. | |
Retained per-model render proxy data used by the culling/LOD code.
Stores cached world-space bounds for every renderable surface of a model:
The data is refreshed by model_component whenever poses/transforms are updated (dirty tracking via version), and consumed by the model submit paths so per-submesh visibility tests become cheap AABB-vs-frustum checks instead of per-draw OBB classification. Unpopulated bounds mean "no cached data" and consumers must fall back to conservative behavior (draw).
Definition at line 29 of file render_proxy.h.
|
inline |
Definition at line 67 of file render_proxy.h.
|
inline |
Definition at line 57 of file render_proxy.h.
|
inline |
Definition at line 49 of file render_proxy.h.
|
inline |
Gets the cached world bounds for a (submesh, instance) pair.
Definition at line 85 of file render_proxy.h.
|
inline |
Gets the cached animated world bounds for a skinned submesh.
Definition at line 104 of file render_proxy.h.
|
inline |
Definition at line 114 of file render_proxy.h.
|
inline |
Definition at line 119 of file render_proxy.h.
|
inline |
True when any cached bounds exist that can diverge from the static mesh box (node-driven submesh placements or skinned pose bounds).
Definition at line 126 of file render_proxy.h.
| math::bbox unravel::submesh_render_proxies::animated_bounds |
Union of all skinned submesh bounds (world space). Unpopulated when the model has no skinned submeshes or bone bounds are unavailable.
Definition at line 40 of file render_proxy.h.
| hpp::small_vector<hpp::small_vector<math::bbox> > unravel::submesh_render_proxies::instance_bounds |
Cached world-space bounds per (submesh, transform instance). Mirrors submesh_pose_mat4::submesh_to_transform_indices layout.
Definition at line 33 of file render_proxy.h.
| math::bbox unravel::submesh_render_proxies::instance_bounds_union |
Union of all populated per-instance bounds (world space), accumulated during refresh so whole-model bounds don't need to walk the per-instance lists.
Definition at line 44 of file render_proxy.h.
| std::vector<math::bbox> unravel::submesh_render_proxies::skinned_bounds |
Cached world-space animated bounds per skinned submesh index.
Definition at line 36 of file render_proxy.h.
| uint64_t unravel::submesh_render_proxies::version {0} |
Increments on every refresh so consumers can detect staleness.
Definition at line 47 of file render_proxy.h.