MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xBoxInitBoundCapsule

Function xBoxInitBoundCapsule

src/SB/Core/x/xMath3.cpp:112–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void xBoxInitBoundCapsule(xBox* b, const xCapsule* c)
113{
114 if (c->start.x < c->end.x)
115 {
116 b->lower.x = c->start.x - c->r;
117 b->upper.x = c->end.x + c->r;
118 }
119 else
120 {
121 b->lower.x = c->end.x - c->r;
122 b->upper.x = c->start.x + c->r;
123 }
124
125 if (c->start.y < c->end.y)
126 {
127 b->lower.y = c->start.y - c->r;
128 b->upper.y = c->end.y + c->r;
129 }
130 else
131 {
132 b->lower.y = c->end.y - c->r;
133 b->upper.y = c->start.y + c->r;
134 }
135
136 if (c->start.z < c->end.z)
137 {
138 b->lower.z = c->start.z - c->r;
139 b->upper.z = c->end.z + c->r;
140 }
141 else
142 {
143 b->lower.z = c->end.z - c->r;
144 b->upper.z = c->start.z + c->r;
145 }
146}
147
148void xBoxFromCone(xBox& box, const xVec3& center, const xVec3& dir, F32 dist, F32 r1, F32 r2)
149{

Callers 1

xSweptSpherePrepareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected