Files
tp/include/SComponent/c_m3d_g_lin.h
T

28 lines
717 B
C++
Raw Normal View History

#ifndef C_M3D_G_LIN_H_
#define C_M3D_G_LIN_H_
2021-01-07 02:04:53 +01:00
#include "SComponent/c_xyz.h"
#include "global.h"
2021-01-26 23:48:47 +01:00
// Line
2021-01-07 02:04:53 +01:00
class cM3dGLin {
2021-01-26 23:48:47 +01:00
// private:
2021-01-07 02:04:53 +01:00
public:
2021-01-26 23:48:47 +01:00
cXyz mStart;
cXyz mEnd;
cM3dGLin() {}
2021-01-07 02:04:53 +01:00
cM3dGLin(const cXyz&, const cXyz&);
2021-01-26 23:48:47 +01:00
virtual ~cM3dGLin() {}
2021-01-07 02:04:53 +01:00
void SetStartEnd(const cXyz&, const cXyz&);
void SetStartEnd(const Vec&, const Vec&);
2021-01-26 23:48:47 +01:00
void CalcPos(Vec*, f32) const;
void CalcVec(Vec* pOut) const { PSVECSubtract(&this->mEnd, &this->mStart, pOut); }
2021-01-07 02:04:53 +01:00
void SetEnd(const cXyz&);
2021-01-26 23:48:47 +01:00
const cXyz& GetStartP(void) const { return mStart; }
cXyz& GetStartP(void) { return mStart; }
const cXyz& GetEndP(void) const { return mEnd; }
cXyz& GetEndP(void) { return mEnd; }
2021-01-07 02:04:53 +01:00
};
#endif