summaryrefslogtreecommitdiff
path: root/include/d/col/c/c_bg_s_poly_info.h
blob: c3087c53671bb401072ca3eb981707963430c473 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef C_BG_S_POLY_INFO_H
#define C_BG_S_POLY_INFO_H

#include "common.h"
#include "d/a/obj/d_a_obj_base.h"
#include "d/col/c/c_bg_w.h"
#include "d/col/c/c_m3d_g_pla.h"
#include "m/m_vec.h"

class cBgS_PolyInfo {
private:
    /* 0x00 */ int mPolyIndex;
    /* 0x04 */ int mBgIndex;
    /* 0x08 */ void *unk_0x04; // Collision Pointer?
    /* 0x0C */ int mActorPId;  // Matched the Unique Actor Id
    /* 0x10 */ cM3dGPla mPla;
    /* 0x20 */ mVec3_c field_0x20;

public:
    cBgS_PolyInfo() {
        ClearPi();
    }
    bool ChkSetInfo() const;
    void SetPolyInfo(const cBgS_PolyInfo &);
    bool ChkSafe(const void *, s32) const;
    void SetPolyIndex(int idx) {
        mPolyIndex = idx;
    }
    bool ChkBgIndex() const;
    mAng GetAngle(mAng) const;

    void SetActorInfo(int bgIndex, void *pData, u32 actor_pid) {
        mBgIndex = bgIndex;
        unk_0x04 = pData;
        mActorPId = actor_pid;
    }

    void ClearPi() {
        mPolyIndex = 0xFFFF;
        mBgIndex = BG_ID_MAX;
        unk_0x04 = nullptr;
        mActorPId = 0;
    }

    u32 GetPolyIndex() const {
        return mPolyIndex;
    }
    u32 GetBgIndex() const {
        return mBgIndex;
    }
    const cM3dGPla &GetPlane() const {
        return mPla;
    }
    cM3dGPla *GetPlaneP() {
        return &mPla;
    }

    const mVec3_c &GetField0x20() const {
        return field_0x20;
    }
};

#endif