16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 07:59:18 +02:00

lazy bounding radius computing for shape_node (avoids O(n^2) deserialization)

This commit is contained in:
milek7
2019-01-12 01:40:22 +01:00
parent 7167771ee6
commit b6e280f14d
3 changed files with 18 additions and 5 deletions

View File

@@ -126,7 +126,10 @@ public:
create_geometry( gfx::geometrybank_handle const &Bank );
// calculates shape's bounding radius
void
compute_radius();
compute_radius();
// invalidates shape's bounding radius
void
invalidate_radius();
// set visibility
void
visible( bool State );
@@ -136,6 +139,8 @@ public:
// data access
shapenode_data const &
data() const;
// get bounding radius
float radius();
private:
// members