MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / pivot_mb

Method pivot_mb

ogsr_engine/xrCore/_sphere.cpp:134–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void Miniball::pivot_mb(It i)
135{
136 It t = ++L.begin();
137 mtf_mb(t);
138 float max_e, old_sqr_r = 0;
139 do
140 {
141 It pivot = L.begin();
142 max_e = max_excess(t, i, pivot);
143 if (max_e > 0)
144 {
145 t = support_end;
146 if (t == pivot)
147 ++t;
148 old_sqr_r = B.squared_radius();
149 B.push(*pivot);
150 mtf_mb(support_end);
151 B.pop();
152 move_to_front(pivot);
153 }
154 } while ((max_e > 0) && (B.squared_radius() > old_sqr_r));
155}
156
157float Miniball::max_excess(It t, It i, It& pivot) const
158{

Callers

nothing calls this directly

Calls 4

squared_radiusMethod · 0.80
beginMethod · 0.45
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected