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

Function GetSphereExtensions

ogsr_engine/xrGame/Geometry.cpp:49–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void GetSphereExtensions(dGeomID sphere, const dReal* axis, const dReal* pos, float center_prg, dReal* lo_ext, dReal* hi_ext)
50{
51 R_ASSERT2(dGeomGetClass(sphere) == dSphereClass, "is not a sphere");
52 dReal radius = dGeomSphereGetRadius(sphere);
53 dReal dif = dDOT(pos, axis) - center_prg;
54 *lo_ext = -radius + dif;
55 *hi_ext = radius + dif;
56}
57
58void TransformedGeometryExtensionLocalParams(dGeomID geom_transform, const dReal* axis, float center_prg, dReal* local_axis, dReal& local_center_prg)
59{

Callers 1

get_extensions_btMethod · 0.85

Calls 2

dGeomGetClassFunction · 0.85
dGeomSphereGetRadiusFunction · 0.85

Tested by

no test coverage detected