diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2026-03-29 16:43:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-29 16:43:00 -0700 |
| commit | cb6ee4b21e25cb40a08c0f1effeebda79896a7e5 (patch) | |
| tree | f894ebc412808129583aaac83a8e1ff8580e0ea9 /src/SSystem | |
| parent | c98b96f94eff76d380c62f3935fefe56057dc99e (diff) | |
d_path / d_vibration debug work (#3138)
* dpath debug
* dvibration debug
* d_meter2_info debug
* gcyl/gpsh debug
Diffstat (limited to 'src/SSystem')
| -rw-r--r-- | src/SSystem/SComponent/c_m3d_g_cyl.cpp | 27 | ||||
| -rw-r--r-- | src/SSystem/SComponent/c_m3d_g_sph.cpp | 18 |
2 files changed, 33 insertions, 12 deletions
diff --git a/src/SSystem/SComponent/c_m3d_g_cyl.cpp b/src/SSystem/SComponent/c_m3d_g_cyl.cpp index 19bf8d795c..c2f292e08d 100644 --- a/src/SSystem/SComponent/c_m3d_g_cyl.cpp +++ b/src/SSystem/SComponent/c_m3d_g_cyl.cpp @@ -6,6 +6,8 @@ #include "SSystem/SComponent/c_m3d_g_cyl.h" #include "SSystem/SComponent/c_m3d.h" +#include "JSystem/JUtility/JUTAssert.h" + cM3dGCyl::cM3dGCyl(const cXyz* center, f32 radius, f32 height) { SetC(*center); SetR(radius); @@ -24,21 +26,30 @@ void cM3dGCyl::Set(const cXyz& center, f32 radius, f32 height) { SetH(height); } -void cM3dGCyl::SetC(const cXyz& center) { - mCenter = center; +void cM3dGCyl::SetC(const cXyz& pos) { + JUT_ASSERT(67, !isnan(pos.x)); + JUT_ASSERT(68, !isnan(pos.y)); + JUT_ASSERT(69, !isnan(pos.z)); + + JUT_ASSERT(72, -1.0e32f < pos.x && pos.x < 1.0e32f && -1.0e32f < pos.y && pos.y < 1.0e32f && -1.0e32f < pos.z && pos.z < 1.0e32f); + + mCenter = pos; } -void cM3dGCyl::SetH(f32 height) { - mHeight = height; +void cM3dGCyl::SetH(f32 h) { + JUT_ASSERT(82, !isnan(h)); + JUT_ASSERT(83, -1.0e32f < h && h < 1.0e32f); + mHeight = h; } -void cM3dGCyl::SetR(f32 radius) { - mRadius = radius; +void cM3dGCyl::SetR(f32 r) { + JUT_ASSERT(106, !isnan(r)); + JUT_ASSERT(107, -1.0e32f < r && r < 1.0e32f); + mRadius = r; } bool cM3dGCyl::cross(const cM3dGSph* other, cXyz* out) const { - f32 f; - return cM3d_Cross_CylSph(this, other, out, &f); + return cM3d_Cross_CylSph(this, other, out); } bool cM3dGCyl::cross(const cM3dGCyl* other, cXyz* out) const { diff --git a/src/SSystem/SComponent/c_m3d_g_sph.cpp b/src/SSystem/SComponent/c_m3d_g_sph.cpp index 3fd65af53a..9d730b0579 100644 --- a/src/SSystem/SComponent/c_m3d_g_sph.cpp +++ b/src/SSystem/SComponent/c_m3d_g_sph.cpp @@ -6,8 +6,16 @@ #include "SSystem/SComponent/c_m3d_g_sph.h" #include "SSystem/SComponent/c_m3d.h" -void cM3dGSph::SetC(const cXyz& center) { - mCenter = center; +#include "JSystem/JUtility/JUTAssert.h" + +void cM3dGSph::SetC(const cXyz& p) { + JUT_ASSERT(19, !isnan(p.x)); + JUT_ASSERT(20, !isnan(p.y)); + JUT_ASSERT(21, !isnan(p.z)); + + JUT_ASSERT(24, -1.0e32f < p.x && p.x < 1.0e32f && -1.0e32f < p.y && p.y < 1.0e32f && -1.0e32f < p.z && p.z < 1.0e32f); + + mCenter = p; } void cM3dGSph::Set(const cXyz& center, f32 radius) { @@ -20,8 +28,10 @@ void cM3dGSph::Set(const cM3dGSphS& other) { SetR(other.mRadius); } -void cM3dGSph::SetR(f32 radius) { - mRadius = radius; +void cM3dGSph::SetR(f32 r) { + JUT_ASSERT(54, !isnan(r)); + JUT_ASSERT(55, -1.0e32f < r && r < 1.0e32f); + mRadius = r; } bool cM3dGSph::cross(const cM3dGSph* other, cXyz* out) const { |
