| 1933 | } |
| 1934 | |
| 1935 | void Course::Area::drawDebugModel(u32 cameraNo) |
| 1936 | { |
| 1937 | TVec3f areaPos(mPos); |
| 1938 | TPos3f direction; |
| 1939 | direction.zeroTrans(); |
| 1940 | direction.setXYZDir(mXNorm, mYNorm, mZNorm); |
| 1941 | TVec3f areaScale; |
| 1942 | Mtx rot; |
| 1943 | Mtx posMtx; |
| 1944 | MtxPtr camMtx = RCMGetCamera(cameraNo)->GetMtx(); |
| 1945 | |
| 1946 | switch (getShape()) |
| 1947 | { |
| 1948 | case 1: |
| 1949 | { |
| 1950 | Mtx r_mtx; |
| 1951 | areaScale.x = mScale.x; |
| 1952 | areaScale.y = mScale.x; |
| 1953 | areaScale.z = mScale.y; |
| 1954 | |
| 1955 | PSMTXRotRad(r_mtx, 'X', MTXDegToRad(90.0f)); |
| 1956 | PSMTXConcat(direction, r_mtx, direction); |
| 1957 | PSMTXScale(rot, areaScale.x, areaScale.y, areaScale.z); // bug? nothing is assigned to rot yet |
| 1958 | PSMTXConcat(direction, rot, posMtx); |
| 1959 | posMtx[0][3] = areaPos.x; |
| 1960 | posMtx[1][3] = areaPos.y; |
| 1961 | posMtx[2][3] = areaPos.z; |
| 1962 | PSMTXConcat(camMtx, posMtx, posMtx); |
| 1963 | |
| 1964 | GXLoadPosMtxImm(posMtx, 0); |
| 1965 | GXDrawCylinder(16); |
| 1966 | break; |
| 1967 | } |
| 1968 | |
| 1969 | default: |
| 1970 | { |
| 1971 | areaPos.scaleAdd(mScale.y * 0.5f, mYNorm, areaPos); |
| 1972 | f32 rad = std::sqrtf(3.0f) * 0.5f; |
| 1973 | areaScale.x = 2.0f * mScale.x * rad; |
| 1974 | areaScale.y = mScale.y * rad; |
| 1975 | areaScale.z = 2.0f * mScale.z * rad; |
| 1976 | PSMTXScale(rot, areaScale.x, areaScale.y, areaScale.z); |
| 1977 | PSMTXConcat(direction, rot, posMtx); |
| 1978 | posMtx[0][3] = areaPos.x; |
| 1979 | posMtx[1][3] = areaPos.y; |
| 1980 | posMtx[2][3] = areaPos.z; |
| 1981 | PSMTXConcat(camMtx, posMtx, posMtx); |
| 1982 | GXLoadPosMtxImm(posMtx, 0); |
| 1983 | GXDrawCube(); |
| 1984 | break; |
| 1985 | } |
| 1986 | } |
| 1987 | } |
| 1988 | |
| 1989 | bool Course::searchAppendGround(const TVec3f &pos) |
| 1990 | { |
no test coverage detected