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

Function t_get_box

ogsr_engine/xrGame/Geometry.cpp:154–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153template <typename geom_type>
154void t_get_box(geom_type* shell, const Fmatrix& form, Fvector& sz, Fvector& c)
155{
156 c.set(0, 0, 0);
157 VERIFY(sizeof(form.i) + sizeof(form._14_) == 4 * sizeof(float));
158 for (int i = 0; 3 > i; ++i)
159 {
160 float lo, hi;
161 const Fvector& ax = cast_fv(((const float*)&form + i * 4));
162 shell->get_extensions_bt(ax, 0, lo, hi);
163 sz[i] = hi - lo;
164 c.add(Fvector().mul(ax, (lo + hi) / 2));
165 }
166}
167
168void CODEGeom::get_Box(Fmatrix& form, Fvector& sz)
169{

Callers 1

get_BoxMethod · 0.85

Calls 4

get_extensions_btMethod · 0.80
setMethod · 0.45
addMethod · 0.45
mulMethod · 0.45

Tested by

no test coverage detected