mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 18:35:20 +02:00
Optimize raycast performance (#15233)
by skipping nodes not on the ray with selection boxes smaller than 1x1x1 early on
This commit is contained in:
@@ -425,6 +425,8 @@ struct ContentFeatures
|
||||
NodeBox node_box;
|
||||
NodeBox selection_box;
|
||||
NodeBox collision_box;
|
||||
//! Whether any selection box extent is > BS/2.
|
||||
bool has_big_selection_box;
|
||||
|
||||
// --- SOUND PROPERTIES ---
|
||||
|
||||
@@ -774,6 +776,9 @@ private:
|
||||
*/
|
||||
void fixSelectionBoxIntUnion();
|
||||
|
||||
//! Calculates ContentFeatures::&has_big_selection_box
|
||||
void calcBigSelectionBox(content_t id, const ContentFeatures &def);
|
||||
|
||||
//! Features indexed by ID.
|
||||
std::vector<ContentFeatures> m_content_features;
|
||||
|
||||
|
Reference in New Issue
Block a user