//
// Generated by dtk
// Translation Unit: c_cc_d.cpp
//

#include "SSystem/SComponent/c_cc_d.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/types.h"

#define CHECK_FLOAT_CLASS(line, x) JUT_ASSERT(line, !(((sizeof(x) == sizeof(float)) ? __fpclassifyf((float)(x)) : __fpclassifyd((double)(x)) ) == 1));
#define CHECK_FLOAT_RANGE(line, x) JUT_ASSERT(line, -1.0e32f < x && x < 1.0e32f);
#define CHECK_VEC3_RANGE(line, v) JUT_ASSERT(line, -1.0e32f < v.x && v.x < 1.0e32f && -1.0e32f < v.y && v.y < 1.0e32f && -1.0e32f < v.z && v.z < 1.0e32f)

/* 802413EC-80241428       .text Chk__15cCcD_DivideInfoCFRC15cCcD_DivideInfo */
bool cCcD_DivideInfo::Chk(const cCcD_DivideInfo& other) const {
    u32 mask = mRangeBits & other.mRangeBits;
    if ((mask & 0x7FF) == 0)
        return false;
    if ((mask & 0xFFE00000) == 0)
        return false;
    if ((mask & 0x1FF800) == 0)
        return false;
    return true;
}

/* 80241428-80241558       .text SetArea__15cCcD_DivideAreaFRC8cM3dGAab */
void cCcD_DivideArea::SetArea(const cM3dGAab& aabb) {
    *(cM3dGAab*)this = aabb;
    mScaledXDiff = (GetMaxX() - GetMinX()) * 0.09090909f;
    mXDiffIsZero = fabsf(mScaledXDiff) < G_CM3D_F_ABS_MIN;
    if (!mXDiffIsZero)
        mInvScaledXDiff = 1.0f / mScaledXDiff;

    mScaledYDiff = (GetMaxY() - GetMinY()) * 0.09090909f;
    mYDiffIsZero = fabsf(mScaledYDiff) < G_CM3D_F_ABS_MIN;
    if (!mYDiffIsZero)
        mInvScaledYDiff = 1.0f / mScaledYDiff;

    mScaledZDiff = (GetMaxZ() - GetMinZ()) * 0.09090909f;
    mZDiffIsZero = fabsf(mScaledZDiff) < G_CM3D_F_ABS_MIN;
    if (!mZDiffIsZero)
        mInvScaledZDiff = 1.0f / mScaledZDiff;
}

/* 80241558-8024170C       .text CalcDivideInfo__15cCcD_DivideAreaFP15cCcD_DivideInfoRC8cM3dGAabUl */
void cCcD_DivideArea::CalcDivideInfo(cCcD_DivideInfo*, const cM3dGAab&, unsigned long) {
    /* Nonmatching */
}

/* 8024170C-80241924       .text CalcDivideInfoOverArea__15cCcD_DivideAreaFP15cCcD_DivideInfoRC8cM3dGAab */
void cCcD_DivideArea::CalcDivideInfoOverArea(cCcD_DivideInfo*, const cM3dGAab&) {
    /* Nonmatching */
}

/* 80241924-8024192C       .text GetGStts__9cCcD_SttsCFv */
const cCcD_GStts* cCcD_Stts::GetGStts() const {
    return NULL;
}

/* 8024192C-80241934       .text GetGStts__9cCcD_SttsFv */
cCcD_GStts* cCcD_Stts::GetGStts() {
    return NULL;
}

/* 80241934-80241994       .text Init__9cCcD_SttsFiiPvUi */
void cCcD_Stts::Init(int weight, int param_1, void* pProc, unsigned int procID) {
    Ct();
    mWeight = weight;
    field_0x15 = param_1;
    mActor = (fopAc_ac_c*)pProc;
    mApid = procID;
}

/* 80241994-802419C4       .text Ct__9cCcD_SttsFv */
void cCcD_Stts::Ct() {
    m_cc_move.x = 0.0f;
    m_cc_move.y = 0.0f;
    m_cc_move.z = 0.0f;
    mActor = NULL;
    mApid = -1;
    mWeight = 0;
    field_0x15 = 0;
    mDmg = 0;
}

/* 802419C4-80241C5C       .text PlusCcMove__9cCcD_SttsFfff */
void cCcD_Stts::PlusCcMove(f32 x, f32 y, f32 z) {
    m_cc_move.x += x;
    m_cc_move.y += y;
    m_cc_move.z += z;
    CHECK_FLOAT_CLASS(0x1bb, m_cc_move.x);
    CHECK_FLOAT_CLASS(0x1bc, m_cc_move.y);
    CHECK_FLOAT_CLASS(0x1bd, m_cc_move.z);
    CHECK_VEC3_RANGE(0x1c1, m_cc_move);
}

/* 80241C5C-80241C98       .text Set__8cCcD_ObjFRC11cCcD_SrcObj */
void cCcD_Obj::Set(const cCcD_SrcObj& src) {
    mFlags = src.mFlags;
    mObjAt.Set(src.mSrcObjHitInf.mObjAt);
    mObjTg.Set(src.mSrcObjHitInf.mObjTg);
    mObjCo.Set(src.mSrcObjHitInf.mObjCo);
}

/* 80241C98-80241D68       .text CrossAtTg__12cCcD_TriAttrCFRC12cCcD_CpsAttrP4cXyz */
bool cCcD_TriAttr::CrossAtTg(const cCcD_CpsAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80241D68-80241DA0       .text CrossAtTg__12cCcD_TriAttrCFRC12cCcD_CylAttrP4cXyz */
bool cCcD_TriAttr::CrossAtTg(const cCcD_CylAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80241DA0-80241DDC       .text CrossAtTg__12cCcD_TriAttrCFRC12cCcD_SphAttrP4cXyz */
bool cCcD_TriAttr::CrossAtTg(const cCcD_SphAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80241DDC-80241E14       .text CrossAtTg__12cCcD_TriAttrCFRC12cCcD_TriAttrP4cXyz */
bool cCcD_TriAttr::CrossAtTg(const cCcD_TriAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80241E14-80241EC4       .text CalcAabBox__12cCcD_TriAttrFv */
void cCcD_TriAttr::CalcAabBox() {
    /* Nonmatching */
}

/* 80241EC4-80241F60       .text GetNVec__12cCcD_TriAttrCFRC4cXyzP4cXyz */
bool cCcD_TriAttr::GetNVec(const cXyz&, cXyz*) const {
    /* Nonmatching */
}

/* 80241F60-80241FA4       .text CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_CpsAttrP4cXyz */
bool cCcD_CpsAttr::CrossAtTg(const cCcD_CpsAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80241FA4-80241FE8       .text CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_CylAttrP4cXyz */
bool cCcD_CpsAttr::CrossAtTg(const cCcD_CylAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80241FE8-8024202C       .text CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_SphAttrP4cXyz */
bool cCcD_CpsAttr::CrossAtTg(const cCcD_SphAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 8024202C-802420FC       .text CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_TriAttrP4cXyz */
bool cCcD_CpsAttr::CrossAtTg(const cCcD_TriAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 802420FC-8024214C       .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_CpsAttrPf */
bool cCcD_CpsAttr::CrossCo(const cCcD_CpsAttr&, f32*) const {
    /* Nonmatching */
}

/* 8024214C-8024219C       .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_CylAttrPf */
bool cCcD_CpsAttr::CrossCo(const cCcD_CylAttr&, f32*) const {
    /* Nonmatching */
}

/* 8024219C-802421EC       .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_SphAttrPf */
bool cCcD_CpsAttr::CrossCo(const cCcD_SphAttr&, f32*) const {
    /* Nonmatching */
}

/* 802421EC-80242294       .text CalcAabBox__12cCcD_CpsAttrFv */
void cCcD_CpsAttr::CalcAabBox() {
    /* Nonmatching */
}

/* 80242294-802423FC       .text GetNVec__12cCcD_CpsAttrCFRC4cXyzP4cXyz */
bool cCcD_CpsAttr::GetNVec(const cXyz&, cXyz*) const {
    /* Nonmatching */
}

/* 802423FC-80242448       .text CrossAtTg__12cCcD_CylAttrCFRC12cCcD_CpsAttrP4cXyz */
bool cCcD_CylAttr::CrossAtTg(const cCcD_CpsAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80242448-8024248C       .text CrossAtTg__12cCcD_CylAttrCFRC12cCcD_CylAttrP4cXyz */
bool cCcD_CylAttr::CrossAtTg(const cCcD_CylAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 8024248C-802424D0       .text CrossAtTg__12cCcD_CylAttrCFRC12cCcD_SphAttrP4cXyz */
bool cCcD_CylAttr::CrossAtTg(const cCcD_SphAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 802424D0-80242508       .text CrossAtTg__12cCcD_CylAttrCFRC12cCcD_TriAttrP4cXyz */
bool cCcD_CylAttr::CrossAtTg(const cCcD_TriAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80242508-8024254C       .text CrossCo__12cCcD_CylAttrCFRC12cCcD_CylAttrPf */
bool cCcD_CylAttr::CrossCo(const cCcD_CylAttr&, f32*) const {
    /* Nonmatching */
}

/* 8024254C-80242590       .text CrossCo__12cCcD_CylAttrCFRC12cCcD_SphAttrPf */
bool cCcD_CylAttr::CrossCo(const cCcD_SphAttr&, f32*) const {
    /* Nonmatching */
}

/* 80242590-802425E8       .text CrossCo__12cCcD_CylAttrCFRC12cCcD_CpsAttrPf */
bool cCcD_CylAttr::CrossCo(const cCcD_CpsAttr&, f32*) const {
    /* Nonmatching */
}

/* 802425E8-8024264C       .text CalcAabBox__12cCcD_CylAttrFv */
void cCcD_CylAttr::CalcAabBox() {
    /* Nonmatching */
}

/* 8024264C-80242734       .text GetNVec__12cCcD_CylAttrCFRC4cXyzP4cXyz */
bool cCcD_CylAttr::GetNVec(const cXyz&, cXyz*) const {
    /* Nonmatching */
}

/* 80242734-80242780       .text CrossAtTg__12cCcD_SphAttrCFRC12cCcD_CpsAttrP4cXyz */
bool cCcD_SphAttr::CrossAtTg(const cCcD_CpsAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80242780-802427C4       .text CrossAtTg__12cCcD_SphAttrCFRC12cCcD_CylAttrP4cXyz */
bool cCcD_SphAttr::CrossAtTg(const cCcD_CylAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 802427C4-80242808       .text CrossAtTg__12cCcD_SphAttrCFRC12cCcD_SphAttrP4cXyz */
bool cCcD_SphAttr::CrossAtTg(const cCcD_SphAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80242808-80242840       .text CrossAtTg__12cCcD_SphAttrCFRC12cCcD_TriAttrP4cXyz */
bool cCcD_SphAttr::CrossAtTg(const cCcD_TriAttr&, cXyz*) const {
    /* Nonmatching */
}

/* 80242840-80242894       .text CrossCo__12cCcD_SphAttrCFRC12cCcD_CylAttrPf */
bool cCcD_SphAttr::CrossCo(const cCcD_CylAttr&, f32*) const {
    /* Nonmatching */
}

/* 80242894-802428D8       .text CrossCo__12cCcD_SphAttrCFRC12cCcD_SphAttrPf */
bool cCcD_SphAttr::CrossCo(const cCcD_SphAttr&, f32*) const {
    /* Nonmatching */
}

/* 802428D8-80242930       .text CrossCo__12cCcD_SphAttrCFRC12cCcD_CpsAttrPf */
bool cCcD_SphAttr::CrossCo(const cCcD_CpsAttr&, f32*) const {
    /* Nonmatching */
}

/* 80242930-802429B8       .text CalcAabBox__12cCcD_SphAttrFv */
void cCcD_SphAttr::CalcAabBox() {
    /* Nonmatching */
}

/* 802429B8-80242A54       .text GetNVec__12cCcD_SphAttrCFRC4cXyzP4cXyz */
bool cCcD_SphAttr::GetNVec(const cXyz&, cXyz*) const {
    /* Nonmatching */
}
