Files
tp/libs/SSystem/SComponent/c_m3d_g_cyl.cpp
T
lepelog 5c83d2532c Decompile some SComponent data and some MSL_C.PPCEABI.bare.H headers (#115)
* data for c_angle

* data c_sxyz

* partially migrated c_xyz data

* c_xyz data

* c_xyz data decomp

* c_math data

* c_math data

* c_lib data, some cleanup

* rename some unnamed functions and create header for them

* header for string functions

* format and fix fabsf

* cleanup

* remove more unneded function prototypes

* move fpclassify to math.h
2021-02-19 10:51:02 -05:00

62 lines
1.5 KiB
C++

/* c_m3d_g_cyl.cpp autogenerated by split.py v0.3 at 2021-01-01 14:45:46.600671 */
#include "SComponent/c_m3d_g_cyl.h"
#include "SComponent/c_m3d.h"
// __ct__8cM3dGCylFPC4cXyzff
cM3dGCyl::cM3dGCyl(const cXyz* pCenter, f32 pRadius, f32 pHeight) {
this->SetC(*pCenter);
this->SetR(pRadius);
this->SetH(pHeight);
}
// Set__8cM3dGCylFRC9cM3dGCylS
void cM3dGCyl::Set(const cM3dGCylS& other) {
this->SetC(cXyz(other.mCenter));
this->SetR(other.mRadius);
this->SetH(other.mHeight);
}
// Set__8cM3dGCylFRC4cXyzff
void cM3dGCyl::Set(const cXyz& pCenter, f32 pRadius, f32 pHeight) {
this->SetC(pCenter);
this->SetR(pRadius);
this->SetH(pHeight);
}
// SetC__8cM3dGCylFRC4cXyz
void cM3dGCyl::SetC(const cXyz& pCenter) {
mCenter = pCenter;
}
// SetH__8cM3dGCylFf
void cM3dGCyl::SetH(f32 pHeight) {
mHeight = pHeight;
}
// SetR__8cM3dGCylFf
void cM3dGCyl::SetR(f32 pRadius) {
mRadius = pRadius;
}
// cross__8cM3dGCylCFPC8cM3dGSphP4cXyz
bool cM3dGCyl::cross(const cM3dGSph* pOther, cXyz* pOut) const {
f32 f;
return cM3d_Cross_CylSph(this, pOther, pOut, &f);
}
// cross__8cM3dGCylCFPC8cM3dGCylP4cXyz
bool cM3dGCyl::cross(const cM3dGCyl* pOther, cXyz* pOut) const {
return cM3d_Cross_CylCyl(this, pOther, pOut);
}
// calcMinMax__8cM3dGCylFP4cXyzP4cXyz
void cM3dGCyl::calcMinMax(cXyz* pMin, cXyz* pMax) {
pMin->x = mCenter.x - mRadius;
pMin->y = mCenter.y;
pMin->z = mCenter.z - mRadius;
pMax->x = mCenter.x + mRadius;
pMax->y = mCenter.y + mHeight;
pMax->z = mCenter.z + mRadius;
}