Files
dusklight/include/SComponent/c_m3d_g_pla.h
T
lepelog 11bf642871 some c_m3d (#97)
* decompiled some bgs_chk funcs

* c_m3d_g

* c_math progress

* remove duplicate SComponent headers

* move some variables and decompile a function

* some inlined from debug

* cM3d_2PlaneLinePosNearPos

* fix fabsf and decompile cM3d_CrawVec

* format

* cleanup

* more cleanup

Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-01-26 17:48:47 -05:00

25 lines
697 B
C++

#ifndef C_M3C_G_PLA_H_
#define C_M3C_G_PLA_H_
#include "SComponent/c_xyz.h"
#include "global.h"
// Plane with a normal
class cM3dGPla {
public:
cXyz mNormal;
f32 mD;
cM3dGPla(const cXyz*, f32);
virtual ~cM3dGPla();
bool crossInfLin(const cXyz&, const cXyz&, cXyz&) const;
void SetupNP0(const Vec&, const Vec&);
void SetupNP(const Vec&, const Vec&);
bool getCrossY(const cXyz&, f32*) const;
bool getCrossYLessD(const Vec&, f32*) const;
void Set(const cM3dGPla*);
f32 getPlaneFunc(const Vec* pPoint) const { return mD + PSVECDotProduct(&mNormal, pPoint); }
const cXyz& GetNP() const { return mNormal; }
f32 GetD() const { return mD; }
};
#endif