9 unsigned int uNumVertices,
12 unsigned int *pOutNumVertices) {
53 if ((
signed int)uNumVertices <= 0) {
61 for (
uint j = 0; j < uNumVertices; j++) {
64 v9 = &pPortalBounding[(j + 1) % (
signed int)uNumVertices];
77 if ((
signed int)*pOutNumVertices <= 0) {
82 for (
int i = 0; i < (
signed int)*pOutNumVertices; i++) {
88 &static_AE3FA4, &static_AE3FB4))
89 AddVertex(&static_AE33A0, &static_AE3FB4);
96 AddVertex(&static_AE33A0, &pVertices2[i]);
102 *pOutNumVertices = 0;
108 &static_AE3FA4, &static_AE3FB4))
109 AddVertex(&static_AE33A0, &static_AE3FB4);
160 if (v21 < 3) *pOutNumVertices = 0;
166 unsigned int *pOutNumVertices,
167 struct Vec3_float_ *CamFrustumNormal,
float CamDotDistance,
char *VertsAdjusted,
178 double pLinelength1 = CamFrustumNormal->
x * pInVertices[0].
vWorldPosition.
x +
182 bool Vert1Inside = pLinelength1 >= CamDotDistance;
184 *pOutNumVertices = 0;
185 if (pInNumVertices <= 0)
return false;
198 bool Vert2Inside =
false;
199 pLineEnd = &pInVertices[VertCounter % pInNumVertices];
203 if (pLinelength2 >= CamDotDistance) Vert2Inside =
true;
205 if (Vert1Inside != Vert2Inside) {
206 t = (CamDotDistance - pLinelength1) / (pLinelength2 - pLinelength1);
216 pOutVertices->
u = pLineStart->
u + (pLineEnd->
u - pLineStart->
u) *
t;
217 pOutVertices->
v = pLineStart->
v + (pLineEnd->
v - pLineStart->
v) *
t;
221 *VertsAdjusted =
true;
225 Vert1Inside = Vert2Inside;
226 pLinelength1 = pLinelength2;
227 if (VertCounter >= pInNumVertices)
break;
232 return *pOutNumVertices >= 3;
282 HEXRAYS_HIWORD(
result) = HEXRAYS_HIWORD(a4);
287 a1a = static_AE3388.
x * a4->
x + static_AE3388.
z * a4->
z +
288 static_AE3388.
y * a4->
y;
289 v8 = static_AE3378.
x * a4->
x + static_AE3378.
z * a4->
z +
290 static_AE3378.
y * a4->
y;
300 if (v10 <= 0.0) v10 = (float)0.0;
310 if (v10 >= 1.0) v10 = (float)1.0;
325 a5->
u = (a2->
u - v6->
u) * v10 + v6->
u;
326 a5->
v = (a2->
v - v6->
v) * v10 + v6->
v;
333 if (v8 < 0.0)
return 1;
350 float flt_F942B4 = static_F942A0.
z * a3->
z +
351 static_F942A0.
y * a3->
y + static_F942A0.
x * a3->
x;
352 if (flt_F942B4 >= 0)
return true;
373 bool result = ((!r1) && (r2 == 1)) || ((r1 == 1) && (!r2));
380 float pNormalX,
float pNormalY,
float pNormalZ,
382 signed int *pOutNumVertices) {
394 static stru312 static_sub_4980B9_stru_AE4BEC;
398 if (uNumVertices <= 0) {
399 *pOutNumVertices = 0;
403 for (
uint i = 0; i < uNumVertices; ++i) {
404 v12 = &a1[(i + 1) % uNumVertices];
415 static_sub_4980B9_stru_AE4BEC.
x = pNormalY * v15 - v14 * pNormalZ;
416 static_sub_4980B9_stru_AE4BEC.
y = v13 * pNormalZ - v15 * pNormalX;
417 static_sub_4980B9_stru_AE4BEC.
z = v14 * pNormalX - v13 * pNormalY;
418 if (*pOutNumVertices == 0)
return true;
420 for (
uint j = 0; j < *pOutNumVertices; ++j) {
423 &static_sub_4980B9_stru_AE4BEC) &&
425 &static_sub_4980B9_stru_AE4BEC, &stru_AE4BFC))
426 AddVertex(&static_sub_4980B9_stru_AE3FE8, &stru_AE4BFC);
430 &static_sub_4980B9_stru_AE4BEC))
431 AddVertex(&static_sub_4980B9_stru_AE3FE8, &pOutVertices[j]);
435 *pOutNumVertices = 0;
439 &a1[i], &static_sub_4980B9_stru_AE4BEC) &&
441 &a1[i], &static_sub_4980B9_stru_AE4BEC, &stru_AE4BFC))
442 AddVertex(&static_sub_4980B9_stru_AE3FE8, &stru_AE4BFC);
457 *pOutNumVertices = static_sub_4980B9_stru_AE3FE8.
uNumVertices;
461 if (v25 < 3) *pOutNumVertices = 0;