mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-26 14:46:16 +00:00
Match sys_math3d.c (#1674)
This commit is contained in:
parent
8ae003b0d7
commit
87a886df5b
1 changed files with 4 additions and 3 deletions
|
@ -922,8 +922,7 @@ f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane) {
|
|||
* `nx`, `ny`, `nz`, and `originDist`
|
||||
*/
|
||||
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) {
|
||||
|
||||
if (IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
|
||||
if (OOT_DEBUG && IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
|
||||
PRINTF(VT_COL(YELLOW, BLACK));
|
||||
// "Math3DLengthPlaneAndPos(): Normal size is near zero %f %f %f"
|
||||
PRINTF("Math3DLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n", nx, ny, nz);
|
||||
|
@ -1823,7 +1822,6 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
|
|||
Vec3f cylIntersectCenter;
|
||||
Vec3f midpointv0v1;
|
||||
Vec3f diffMidpointIntersect;
|
||||
f32 distFromCylYIntersectTov0v1;
|
||||
s32 pad;
|
||||
|
||||
cylBottom = (f32)cyl->pos.y + cyl->yShift;
|
||||
|
@ -1865,6 +1863,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
|
|||
if (Math3D_TriChkLineSegParaYIntersect(&tri->vtx[0], &tri->vtx[1], &tri->vtx[2], tri->plane.normal.x,
|
||||
tri->plane.normal.y, tri->plane.normal.z, tri->plane.originDist, cyl->pos.z,
|
||||
cyl->pos.x, &yIntersect, cylBottom, cylTop)) {
|
||||
f32 distFromCylYIntersectTov0v1;
|
||||
|
||||
cylIntersectCenter.x = cyl->pos.x;
|
||||
cylIntersectCenter.y = yIntersect;
|
||||
|
@ -2145,8 +2144,10 @@ s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#if OOT_DEBUG
|
||||
void Math3D_DrawSphere(PlayState* play, Sphere16* sph) {
|
||||
}
|
||||
|
||||
void Math3D_DrawCylinder(PlayState* play, Cylinder16* cyl) {
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue