forked from zeldaret/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathc_m3d_g_lin.h
More file actions
39 lines (32 loc) · 1.13 KB
/
c_m3d_g_lin.h
File metadata and controls
39 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef C_M3D_G_LIN_H
#define C_M3D_G_LIN_H
#include "SSystem/SComponent/c_xyz.h"
#include "global.h"
// Line
class cM3dGLin {
// private:
public:
/* 0x00 */ cXyz mStart;
/* 0x0C */ cXyz mEnd;
/* 0x18 vtable */
cM3dGLin() {}
cM3dGLin(const cXyz&, const cXyz&);
virtual ~cM3dGLin() {}
void SetStartEnd(const cXyz&, const cXyz&);
void SetStartEnd(const Vec&, const Vec&);
void CalcPos(Vec*, f32) const;
void CalcVec(Vec* pOut) const { PSVECSubtract(&this->mEnd, &this->mStart, pOut); }
void SetEnd(const cXyz&);
void set(const Vec& i_start, const Vec& i_end) { SetStartEnd(i_start, i_end); }
const cXyz* GetStartP() const { return &mStart; }
cXyz* GetStartP() { return &mStart; }
cXyz& GetStart() { return mStart; }
const cXyz& GetStart() const { return mStart; }
const cXyz* GetEndP() const { return &mEnd; }
cXyz* GetEndP() { return &mEnd; }
cXyz& GetEnd() { return mEnd; }
const cXyz& GetEnd() const { return mEnd; }
f32 GetLen() const { return PSVECDistance(&mStart, &mEnd); }
}; // Size = 0x1C
STATIC_ASSERT(0x1C == sizeof(cM3dGLin));
#endif /* C_M3D_G_LIN_H */