summaryrefslogtreecommitdiff
path: root/src/SSystem/SComponent/c_m3d_g_cyl.cpp
blob: fcc8f7976f461685a91768f4d923dc627334710f (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
//
// Generated by dtk
// Translation Unit: c_m3d_g_cyl.cpp
//

#include "SSystem/SComponent/c_m3d_g_cyl.h"
#include "SSystem/SComponent/c_m3d.h"
#include "JSystem/JUtility/JUTAssert.h"

#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)

#if VERSION > VERSION_DEMO
/* 80251D88-80252020       .text SetC__8cM3dGCylFRC4cXyz */
void cM3dGCyl::SetC(const cXyz& pos) {
    JUT_ASSERT(21, !isnan(pos.x));
    JUT_ASSERT(22, !isnan(pos.y));
    JUT_ASSERT(23, !isnan(pos.z));
    CHECK_VEC3_RANGE(26, pos);
    mCenter = pos;
}

/* 80252020-8025214C       .text SetH__8cM3dGCylFf */
void cM3dGCyl::SetH(f32 h) {
    JUT_ASSERT(36, !isnan(h));
    CHECK_FLOAT_RANGE(37, h);
    mHeight = h;
}

/* 8025214C-80252278       .text SetR__8cM3dGCylFf */
void cM3dGCyl::SetR(f32 r) {
    JUT_ASSERT(48, !isnan(r));
    CHECK_FLOAT_RANGE(49, r);
    mRadius = r;
}
#endif

/* 80252278-8025229C       .text cross__8cM3dGCylCFPC8cM3dGSphP4cXyz */
bool cM3dGCyl::cross(const cM3dGSph* pOther, cXyz* pOut) const {
    f32 f;
    return cM3d_Cross_CylSph(this, pOther, pOut, &f);
}

/* 8025229C-802522BC       .text cross__8cM3dGCylCFPC8cM3dGCylPf */
bool cM3dGCyl::cross(const cM3dGCyl* pOther, f32* pOut) const {
    return cM3d_Cross_CylCyl(this, pOther, pOut);
}

/* 802522BC-802522DC       .text cross__8cM3dGCylCFPC8cM3dGCylP4cXyz */
bool cM3dGCyl::cross(const cM3dGCyl* pOther, cXyz* pOut) const {
    return cM3d_Cross_CylCyl(this, pOther, pOut);
}

/* 802522DC-80252304       .text cross__8cM3dGCylCFPC8cM3dGSphPf */
bool cM3dGCyl::cross(const cM3dGSph* pOther, f32* pOut) const {
    cXyz xyz;
    return cM3d_Cross_CylSph(this, pOther, &xyz, pOut);
}