MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / bounds_capsule_contains

Function bounds_capsule_contains

StereoKitC/intersect.cpp:120–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118///////////////////////////////////////////
119
120bool32_t bounds_capsule_contains(bounds_t bounds, vec3 pt1, vec3 pt2, float radius) {
121 // A simple hack with some slight error at the corners, is to just
122 // inflate the bounds by the radius of the capsule!
123 return bounds_line_contains(bounds_t{ bounds.center, bounds.dimensions + vec3{radius*2,radius*2,radius*2} }, pt1, pt2);
124}
125
126///////////////////////////////////////////
127

Callers 1

ui_in_boxFunction · 0.85

Calls 1

bounds_line_containsFunction · 0.85

Tested by

no test coverage detected