310 NSCParameterAssert(data != NULL);
312 OOScalar subHalfWidth = 0.5f * halfWidth;
314 if (data->count == 0)
364 uint_fast32_t subCapacity = data->count * kFactor;
366#define DECL_GEOMETRY(NAME, CAP) GeometryData NAME; InitGeometryData(&NAME, CAP);
381 if (g_xx0.count != 0)
387 if (g_x00.count != 0)
391 if (g_x10.count != 0)
398 if (g_xx1.count != 0)
404 if (g_x01.count != 0)
408 if (g_x11.count != 0)
491 NSCParameterAssert(data != NULL && dPlus != NULL && dMinus != NULL);
494 uint_fast32_t i,
count = data->count;
495 for (i = 0; i <
count; i++)
497 bool done_tri =
false;
498 Vector v0 = data->triangles[i].v[0];
499 Vector v1 = data->triangles[i].v[1];
500 Vector v2 = data->triangles[i].v[2];
502 if (v0.x >= 0.0f && v1.x >= 0.0f && v2.x >= 0.0f)
507 else if (v0.x <= 0.0f && v1.x <= 0.0f && v2.x <= 0.0f)
518 i01 = v0.x / (v0.x - v1.x);
522 i12 = v1.x / (v1.x - v2.x);
526 i20 = v2.x / (v2.x - v0.x);
528 Vector v01 = make_vector(0.0f, i01 * (v1.y - v0.y) + v0.y, i01 * (v1.z - v0.z) + v0.z);
529 Vector v12 = make_vector(0.0f, i12 * (v2.y - v1.y) + v1.y, i12 * (v2.z - v1.z) + v1.z);
530 Vector v20 = make_vector(0.0f, i20 * (v0.y - v2.y) + v2.y, i20 * (v0.z - v2.z) + v2.z);
573 if (v0.x > 0.0f && v1.x > 0.0f && v2.x < 0.0f)
580 if (v0.x > 0.0f && v1.x < 0.0f && v2.x > 0.0f)
587 if (v0.x > 0.0f && v1.x < 0.0f && v2.x < 0.0f)
594 if (v0.x < 0.0f && v1.x > 0.0f && v2.x > 0.0f)
601 if (v0.x < 0.0f && v1.x > 0.0f && v2.x < 0.0f)
608 if (v0.x < 0.0f && v1.x < 0.0f && v2.x > 0.0f)
623 NSCParameterAssert(data != NULL && dPlus != NULL && dMinus != NULL);
626 uint_fast32_t i,
count = data->count;
627 for (i = 0; i <
count; i++)
629 bool done_tri =
false;
630 Vector v0 = data->triangles[i].v[0];
631 Vector v1 = data->triangles[i].v[1];
632 Vector v2 = data->triangles[i].v[2];
634 if (v0.y >= 0.0f && v1.y >= 0.0f && v2.y >= 0.0f)
639 if (v0.y <= 0.0f && v1.y <= 0.0f && v2.y <= 0.0f)
651 i01 = v0.y / (v0.y - v1.y);
655 i12 = v1.y / (v1.y - v2.y);
659 i20 = v2.y / (v2.y - v0.y);
661 Vector v01 = make_vector(i01 * (v1.x - v0.x) + v0.x, 0.0f, i01 * (v1.z - v0.z) + v0.z);
662 Vector v12 = make_vector(i12 * (v2.x - v1.x) + v1.x, 0.0f, i12 * (v2.z - v1.z) + v1.z);
663 Vector v20 = make_vector(i20 * (v0.x - v2.x) + v2.x, 0.0f, i20 * (v0.z - v2.z) + v2.z);
706 if (v0.y > 0.0f && v1.y > 0.0f && v2.y < 0.0f)
713 if (v0.y > 0.0f && v1.y < 0.0f && v2.y > 0.0f)
720 if (v0.y > 0.0f && v1.y < 0.0f && v2.y < 0.0f)
727 if (v0.y < 0.0f && v1.y > 0.0f && v2.y > 0.0f)
734 if (v0.y < 0.0f && v1.y > 0.0f && v2.y < 0.0f)
741 if (v0.y < 0.0f && v1.y < 0.0f && v2.y > 0.0f)
756 NSCParameterAssert(data != NULL && dPlus != NULL && dMinus != NULL);
759 uint_fast32_t i,
count = data->count;
760 for (i = 0; i <
count; i++)
762 bool done_tri =
false;
763 Vector v0 = data->triangles[i].v[0];
764 Vector v1 = data->triangles[i].v[1];
765 Vector v2 = data->triangles[i].v[2];
767 if (v0.z >= 0.0f && v1.z >= 0.0f && v2.z >= 0.0f)
772 else if (v0.z <= 0.0f && v1.z <= 0.0f && v2.z <= 0.0f)
784 i01 = v0.z / (v0.z - v1.z);
788 i12 = v1.z / (v1.z - v2.z);
792 i20 = v2.z / (v2.z - v0.z);
794 Vector v01 = make_vector(i01 * (v1.x - v0.x) + v0.x, i01 * (v1.y - v0.y) + v0.y, 0.0f);
795 Vector v12 = make_vector(i12 * (v2.x - v1.x) + v1.x, i12 * (v2.y - v1.y) + v1.y, 0.0f);
796 Vector v20 = make_vector(i20 * (v0.x - v2.x) + v2.x, i20 * (v0.y - v2.y) + v2.y, 0.0f);
839 if (v0.z > 0.0f && v1.z > 0.0f && v2.z < 0.0f)
846 if (v0.z > 0.0f && v1.z < 0.0f && v2.z > 0.0f)
853 if (v0.z > 0.0f && v1.z < 0.0f && v2.z < 0.0f)
860 if (v0.z < 0.0f && v1.z > 0.0f && v2.z > 0.0f)
867 if (v0.z < 0.0f && v1.z > 0.0f && v2.z < 0.0f)
874 if (v0.z < 0.0f && v1.z < 0.0f && v2.z > 0.0f)