| 1 | #pragma once |
| 2 | |
| 3 | #include <gfx/seadColor.h> |
| 4 | #include <math/seadBoundBox.h> |
| 5 | #include <math/seadMatrix.h> |
| 6 | #include <math/seadVector.h> |
| 7 | |
| 8 | #include "Library/Math/Axis.h" |
| 9 | |
| 10 | namespace al { |
| 11 | enum class Axis : s32; |
| 12 | class VisitCellCallBack; |
| 13 | |
| 14 | template <typename T> |
| 15 | inline T clamp(T value, T min, T max) { |
| 16 | if (value < min) |
| 17 | return min; |
| 18 | if (value > max) |
| 19 | return max; |
| 20 | return value; |
| 21 | } |
| 22 | |
| 23 | enum EaseType : s32 { |
| 24 | EaseType_EaseIn = 1, |
| 25 | EaseType_EaseOut, |
| 26 | EaseType_EaseInOut, |
| 27 | EaseType_SquareIn, |
| 28 | EaseType_SquareOut |
| 29 | }; |
| 30 | |
| 31 | f32 calcAngleRadian(const sead::Vector3f& a, const sead::Vector3f& b); |
| 32 | f32 calcAngleDegree(const sead::Vector3f& a, const sead::Vector3f& b); |
| 33 | f32 calcAngleDegree(const sead::Vector2f& a, const sead::Vector2f& b); |
| 34 | bool isNearZero(const sead::Vector2f& vec, f32 tolerance = 0.001f); |
| 35 | bool tryCalcAngleDegree(f32* angle, const sead::Vector3f& a, const sead::Vector3f& b); |
| 36 | bool isNearZero(const sead::Vector3f& vec, f32 tolerance = 0.001f); |
| 37 | f32 calcAngleOnPlaneRadian(const sead::Vector3f& a, const sead::Vector3f& b, |
| 38 | const sead::Vector3f& vertical); |
| 39 | void verticalizeVec(sead::Vector3f* out, const sead::Vector3f& vertical, const sead::Vector3f& vec); |
| 40 | f32 calcAngleOnPlaneDegree(const sead::Vector3f& a, const sead::Vector3f& b, |
| 41 | const sead::Vector3f& vertical); |
| 42 | f32 calcAngleOnPlaneDegreeOrZero(const sead::Vector3f& a, const sead::Vector3f& b, |
| 43 | const sead::Vector3f& vertical); |
| 44 | bool tryCalcAngleOnPlaneDegree(f32* angle, const sead::Vector3f& a, const sead::Vector3f& b, |
| 45 | const sead::Vector3f& vertical); |
| 46 | bool isParallelDirection(const sead::Vector3f& a, const sead::Vector3f& b, f32 tolerance = 0.01f); |
| 47 | s32 calcAngleSignOnPlane(const sead::Vector3f& a, const sead::Vector3f& b, |
| 48 | const sead::Vector3f& vertical); |
| 49 | bool isNearAngleRadian(const sead::Vector2f& a, const sead::Vector2f& b, f32 tolerance); |
| 50 | void normalize(sead::Vector2f* out, const sead::Vector2f& vec); |
| 51 | bool isNearAngleRadian(const sead::Vector3f& a, const sead::Vector3f& b, f32 tolerance); |
| 52 | void normalize(sead::Vector3f* out, const sead::Vector3f& vec); |
| 53 | bool isNearAngleDegree(const sead::Vector2f& a, const sead::Vector2f& b, f32 tolerance); |
| 54 | bool isNearAngleDegree(const sead::Vector3f& a, const sead::Vector3f& b, f32 tolerance); |
| 55 | bool isNearAngleRadianHV(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, f32, |
| 56 | f32); |
| 57 | bool tryNormalizeOrZero(sead::Vector3f* out, const sead::Vector3f& vec); |
| 58 | bool tryNormalizeOrZero(sead::Vector3f* out); |
| 59 | bool isNearAngleDegreeHV(const sead::Vector3f& a, const sead::Vector3f& b, const sead::Vector3f& c, |
| 60 | f32 toleranceH, f32 toleranceV); |
| 61 | bool isInAngleOnPlaneDegreeHV(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, |
| 62 | f32, f32, f32, f32); |
| 63 | bool isNear(f32 value, f32 target, f32 tolerance = 0.001f); |
| 64 | bool isNear(const sead::Vector2f& value, const sead::Vector2f& target, f32 tolerance = 0.001f); |
| 65 | bool isNear(const sead::Vector3f& value, const sead::Vector3f& target, f32 tolerance = 0.001f); |
| 66 | bool isNear(const sead::Color4f& value, const sead::Color4f& target, f32 tolerance = 0.001f); |
| 67 | bool isNearZero(f32 value, f32 tolerance = 0.001f); |
| 68 | bool isNearZero(const sead::Matrix34f& mtx, f32 tolerance = 0.001f); |
| 69 | bool isNearZeroOrGreater(f32 value, f32 tolerance = 0.001f); |
| 70 | bool isNearZeroOrLess(f32 value, f32 tolerance = 0.001f); |
| 71 | bool isExistNearZeroVal(const sead::Vector3f& vec, f32 tolerance); |
| 72 | bool isNormalize(const sead::Vector3f& vec, f32 tolerance = 0.001f); |
| 73 | bool isNormalize(const sead::Matrix34f& mtx); |
| 74 | bool isParallelDirection(const sead::Vector2f& a, const sead::Vector2f& b, f32 tolerance = 0.01f); |
| 75 | bool isReverseDirection(const sead::Vector3f& a, const sead::Vector3f& b, f32 tolerance = 0.01f); |
| 76 | bool isNearDirection(const sead::Vector2f& a, const sead::Vector2f& b, f32 tolerance = 0.01f); |
| 77 | bool isNearDirection(const sead::Vector3f& a, const sead::Vector3f& b, f32 tolerance = 0.01f); |
| 78 | bool isInRange(s32 x, s32 a, s32 b); |
| 79 | bool isInRange(f32 x, f32 a, f32 b); |
| 80 | void normalize(sead::Vector2f* vec); |
| 81 | void normalize(sead::Vector3f* vec); |
| 82 | void normalize(sead::Matrix33f* mtx); |
| 83 | void normalize(sead::Matrix34f* mtx); |
| 84 | bool tryNormalizeOrZero(sead::Vector2f* vec); |
| 85 | bool tryNormalizeOrZero(sead::Vector2f* out, const sead::Vector2f& vec); |
| 86 | bool tryNormalizeOrDirZ(sead::Vector3f* vec); |
| 87 | bool tryNormalizeOrDirZ(sead::Vector3f* out, const sead::Vector3f& vec); |
| 88 | void normalizeComplement(sead::Matrix34f* mtx); |
| 89 | u32 getMaxAbsElementIndex(const sead::Vector3f& vec); |
| 90 | void setLength(sead::Vector3f* vec, f32 length); |
| 91 | void setProjectionLength(sead::Vector3f* out, const sead::Vector3f& vec, f32 length); |
| 92 | bool limitLength(sead::Vector2f* out, const sead::Vector2f& vec, f32 limit); |
| 93 | bool limitLength(sead::Vector3f* out, const sead::Vector3f& vec, f32 limit); |
| 94 | f32 normalizeAbs(f32 x, f32 min, f32 max); |
| 95 | f32 normalize(f32 x, f32 min, f32 max); |
| 96 | f32 normalize(s32 x, s32 min, s32 max); |
| 97 | f32 sign(f32 x); |
| 98 | s32 sign(s32 x); |
| 99 | f32 cubeRoot(f32 x); |
| 100 | void clampV3f(sead::Vector3f* out, const sead::Vector3f& min, const sead::Vector3f& max); |
| 101 | void clampV2f(sead::Vector2f* out, const sead::Vector2f& min, const sead::Vector2f& max); |
| 102 | f32 easeIn(f32 t); |
| 103 | f32 easeOut(f32 t); |
| 104 | f32 easeInOut(f32 t); |
| 105 | f32 squareIn(f32 t); |
| 106 | f32 squareOut(f32 t); |
| 107 | f32 powerIn(f32 t, f32 exp); |
| 108 | f32 powerOut(f32 t, f32 exp); |
| 109 | f32 logarithmIn(f32 t, f32 base); |
| 110 | f32 logarithmOut(f32 t, f32 base); |
| 111 | f32 exponentIn(f32 t, f32 exp); |
| 112 | f32 exponentOut(f32 t, f32 exp); |
| 113 | f32 hermiteRate(f32 t, f32 m0, f32 m1); |
| 114 | f32 calcFourthOrderRate(f32 t, f32 scale); |
| 115 | f32 calcTriangleWave01(f32, f32); |
| 116 | f32 calcTriangleWave(f32, f32, f32, f32); |
| 117 | f32 lerpValue(f32 a, f32 b, f32 t); |
| 118 | f32 calcRate01(f32, f32, f32); |
| 119 | f32 easeByType(f32 t, s32 easeType); |
| 120 | f32 lerpValue(f32, f32, f32, f32, f32); |
| 121 | f32 lerpDegree(f32, f32, f32); |
| 122 | f32 lerpRadian(f32, f32, f32); |
| 123 | void lerpVec(sead::Vector2f*, const sead::Vector2f&, const sead::Vector2f&, f32); |
| 124 | void lerpVec(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 125 | void lerpVecHV(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, |
| 126 | f32, f32); |
| 127 | void separateVectorHV(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&, |
| 128 | const sead::Vector3f&); |
| 129 | void lerpColor(sead::Color4f*, const sead::Color4f&, const sead::Color4f&, f32); |
| 130 | f32 lerpLogValueEaseIn(f32, f32, f32, f32); |
| 131 | f32 lerpLogValueEaseOut(f32, f32, f32, f32); |
| 132 | void lerpLogVecEaseIn(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, f32); |
| 133 | void lerpLogVecEaseOut(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, f32); |
| 134 | f32 lerpExponentValueEaseIn(f32, f32, f32, f32); |
| 135 | f32 lerpExponentValueEaseOut(f32, f32, f32, f32); |
| 136 | void lerpExponentVecEaseIn(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, f32); |
| 137 | void lerpExponentVecEaseOut(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, |
| 138 | f32); |
| 139 | f32 clampLeapMinAbs(f32, f32, f32, f32); |
| 140 | f32 hermite(f32 y0, f32 m0, f32 y1, f32 m1, f32 t); |
| 141 | f32 hermite(f32 y0, f32 m0, f32 y1, f32 m1, f32 t, f32 width); |
| 142 | void hermiteVec(sead::Vector3f* out, const sead::Vector3f& p0, const sead::Vector3f& v0, |
| 143 | const sead::Vector3f& p1, const sead::Vector3f& v1, f32 t); |
| 144 | s32 converge(s32, s32, s32); |
| 145 | f32 converge(f32, f32, f32); |
| 146 | f32 convergeDegree(f32, f32, f32); |
| 147 | f32 convergeRadian(f32, f32, f32); |
| 148 | void convergeVec(sead::Vector2f*, const sead::Vector2f&, const sead::Vector2f&, f32); |
| 149 | void convergeVec(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 150 | f32 diffNearAngleDegree(f32, f32); |
| 151 | bool isInRangeAngleDegree(f32, f32, f32); |
| 152 | bool calcEyesAnimAngleInRange(f32*, const sead::Vector3f&, const sead::Vector3f&, |
| 153 | const sead::Vector3f&, const sead::Vector3f&, f32, f32, f32, f32); |
| 154 | bool isSameSign(f32, f32); |
| 155 | u8 reverseBit8(u8 x); |
| 156 | u16 reverseBit16(u16 x); |
| 157 | u32 reverseBit32(u32 x); |
| 158 | f32 calcVanDerCorput(u32 x); |
| 159 | void calcHammersleyPoint(sead::Vector2f* outPoint, u32 i, u32 num); |
| 160 | s32 findMaxFromArray(const s32*, s32); |
| 161 | void separateMinMax(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&); |
| 162 | s32 findMinFromArray(const s32*, s32); |
| 163 | f32 getRandom(); |
| 164 | f32 getRandom(f32 max); |
| 165 | f32 getRandom(f32 min, f32 max); |
| 166 | s32 getRandom(s32 max); |
| 167 | s32 getRandom(s32 min, s32 max); |
| 168 | f32 getRandomDegree(); |
| 169 | f32 getRandomRadian(); |
| 170 | void getRandomVector(sead::Vector3f* vec, f32 maxComponent); |
| 171 | void getRandomDir(sead::Vector3f* vec); |
| 172 | void getRandomDirH(sead::Vector3f*, const sead::Vector3f&); |
| 173 | void rotateVectorDegree(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 174 | void getRandomOnCircle(sead::Vector2f*, f32); |
| 175 | void getRandomInCircle(sead::Vector2f*, f32); |
| 176 | void getRandomInCircleMinMaxRadius(sead::Vector2f*, f32, f32); |
| 177 | void getRandomInCircle(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 178 | void getRandomOnSphere(sead::Vector3f*, f32); |
| 179 | void getRandomInSphere(sead::Vector3f*, f32); |
| 180 | bool calcRandomDirInCone(sead::Vector3f*, const sead::Vector3f&, f32); |
| 181 | void getRandomInSphereMinMaxRadius(sead::Vector3f*, f32, f32); |
| 182 | void initRandomSeed(u32); |
| 183 | void initRandomSeedByTick(); |
| 184 | void initRandomSeedByString(const char*); |
| 185 | bool isHalfProbability(); |
| 186 | bool isPercentProbability(f32); |
| 187 | void getRandomContext(u32*, u32*, u32*, u32*); |
| 188 | void setRandomContext(u32, u32, u32, u32); |
| 189 | void makeRandomDirXZ(sead::Vector3f*); |
| 190 | f32 calcBoxMullerRandomGauss(); |
| 191 | void makeBoxMullerRandomGauss(sead::Vector2f*, f32, f32); |
| 192 | f32 modf(f32 a, f32 b); |
| 193 | s32 modi(s32 a, s32 b); |
| 194 | f32 calcSpeedMax(f32 accel, f32 friction); |
| 195 | f32 calcAccel(f32 speed, f32 friction); |
| 196 | f32 calcFriction(f32 accel, f32 speed); |
| 197 | bool separateScalarAndDirection(f32*, sead::Vector2f*, const sead::Vector2f&); |
| 198 | bool separateScalarAndDirection(f32*, sead::Vector3f*, const sead::Vector3f&); |
| 199 | void limitVectorSeparateHV(sead::Vector3f*, const sead::Vector3f&, f32, f32); |
| 200 | void parallelizeVec(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&); |
| 201 | void calcVectorSeparateHV(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, f32); |
| 202 | void limitVectorParallelVertical(sead::Vector3f*, const sead::Vector3f&, f32, f32); |
| 203 | void separateVectorParallelVertical(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&, |
| 204 | const sead::Vector3f&); |
| 205 | bool addVectorLimit(sead::Vector3f*, const sead::Vector3f&, f32); |
| 206 | void alongVectorNormalH(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 207 | const sead::Vector3f&); |
| 208 | f32 calcDistanceVecToPlane(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, |
| 209 | const sead::Vector3f&); |
| 210 | void limitPlanePos(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 211 | const sead::Vector3f&); |
| 212 | bool limitCylinderInPos(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 213 | const sead::Vector3f&, f32); |
| 214 | bool limitCylinderInDir(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 215 | const sead::Vector3f&, const sead::Vector3f&); |
| 216 | bool limitCylinderInPos(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 217 | bool limitCylinderInDir(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 218 | const sead::Vector3f&); |
| 219 | void roundOffVec(sead::Vector3f* outVec, const sead::Vector3f& vec); |
| 220 | void roundOffVec(sead::Vector3f* vec); |
| 221 | void roundOffVec(sead::Vector2f* outVec, const sead::Vector2f& vec); |
| 222 | void roundOffVec(sead::Vector2f* vec); |
| 223 | f32 snapToGrid(f32 val, f32 gridSize, f32 offset); |
| 224 | void snapVecToGrid(sead::Vector3f* outVec, const sead::Vector3f& vec, f32 gridSize, |
| 225 | const sead::Vector3f& offset); |
| 226 | void snapVecToGrid(sead::Vector3f* outVec, const sead::Vector3f& vec, |
| 227 | const sead::Vector3f& gridSize, const sead::Vector3f& offset); |
| 228 | void limitVectorOppositeDir(sead::Vector3f* outVec, const sead::Vector3f& inVec, |
| 229 | const sead::Vector3f& dir, f32 scale); |
| 230 | void scaleVectorDirection(sead::Vector3f* outVec, const sead::Vector3f& inVec, |
| 231 | const sead::Vector3f& dir, f32 scale); |
| 232 | void scaleVectorExceptDirection(sead::Vector3f* outVec, const sead::Vector3f& inVec, |
| 233 | const sead::Vector3f& dir, f32 scale); |
| 234 | void snapVecToDirAxisY(sead::Vector3f*, const sead::Vector3f&, s32); |
| 235 | bool calcDir(sead::Vector3f* outVec, const sead::Vector3f& vecA, const sead::Vector3f& vecB); |
| 236 | bool calcDirH(sead::Vector3f* outVec, const sead::Vector3f& vecA, const sead::Vector3f& vecB); |
| 237 | bool calcDirOnPlane(sead::Vector3f* outVec, const sead::Vector3f& vecA, const sead::Vector3f& vecB, |
| 238 | const sead::Vector3f& plane); |
| 239 | f32 mapRangeLogarithmic(f32 x, f32 min, f32 max, f32 start, f32 end, f32 exponent); |
| 240 | void calcDirFromLongitudeLatitude(sead::Vector3f* outVec, f32 longitude, f32 latitude); |
| 241 | void calcLongitudeLatitudeFromDir(f32* longitude, f32* latitude, const sead::Vector3f& dir); |
| 242 | |
| 243 | u32 getMaxAbsElementIndex(const sead::Vector3i& vec); |
| 244 | f32 getMaxAbsElementValue(const sead::Vector3f& vec); |
| 245 | s32 getMaxAbsElementValue(const sead::Vector3i& vec); |
| 246 | u32 getMinAbsElementIndex(const sead::Vector3f& vec); |
| 247 | u32 getMinAbsElementIndex(const sead::Vector3i& vec); |
| 248 | f32 getMinAbsElementValue(const sead::Vector3f& vec); |
| 249 | s32 getMinAbsElementValue(const sead::Vector3i& vec); |
| 250 | |
| 251 | Axis calcNearVecFromAxis2(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 252 | const sead::Vector3f&); |
| 253 | Axis calcNearVecFromAxis3(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 254 | const sead::Vector3f&, const sead::Vector3f&); |
| 255 | void calcDirVerticalAny(sead::Vector3f*, const sead::Vector3f&); |
| 256 | void calcDirSlide(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&); |
| 257 | Axis calcNearVecFromAxis3(sead::Vector3f*, const sead::Vector3f&, const sead::Quatf&); |
| 258 | void calcQuatLocalAxisAll(const sead::Quatf&, sead::Vector3f*, sead::Vector3f*, sead::Vector3f*); |
| 259 | void addRandomVector(sead::Vector3f*, const sead::Vector3f&, f32); |
| 260 | void turnRandomVector(sead::Vector3f*, const sead::Vector3f&, f32); |
| 261 | void makeAxisFrontUp(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&, |
| 262 | const sead::Vector3f&); |
| 263 | void makeAxisFrontSide(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&, |
| 264 | const sead::Vector3f&); |
| 265 | void makeAxisUpFront(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&, |
| 266 | const sead::Vector3f&); |
| 267 | void makeAxisUpSide(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&); |
| 268 | void makeQuatFromTwoAxis(sead::Quatf* outQuat, const sead::Vector3f& vectorA, |
| 269 | const sead::Vector3f& vectorB, s32 axisA, s32 axisB); |
| 270 | void makeQuatFrontUp(sead::Quatf* outQuat, const sead::Vector3f& front, const sead::Vector3f& up); |
| 271 | void makeQuatFrontSide(sead::Quatf* outQuat, const sead::Vector3f& front, |
| 272 | const sead::Vector3f& side); |
| 273 | void makeQuatFrontNoSupport(sead::Quatf* outQuat, const sead::Vector3f& front); |
| 274 | void makeQuatUpFront(sead::Quatf* outQuat, const sead::Vector3f& up, const sead::Vector3f& front); |
| 275 | void makeQuatUpSide(sead::Quatf* outQuat, const sead::Vector3f& up, const sead::Vector3f& side); |
| 276 | void makeQuatUpNoSupport(sead::Quatf* outQuat, const sead::Vector3f& up); |
| 277 | void makeQuatSideUp(sead::Quatf* outQuat, const sead::Vector3f& side, const sead::Vector3f& up); |
| 278 | void makeQuatSideFront(sead::Quatf* outQuat, const sead::Vector3f& side, |
| 279 | const sead::Vector3f& front); |
| 280 | void makeQuatSideNoSupport(sead::Quatf* outQuat, const sead::Vector3f& side); |
| 281 | void makeQuatFromToQuat(sead::Quatf*, const sead::Quatf&, const sead::Quatf&); |
| 282 | void makeQuatRotationRate(sead::Quatf*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 283 | bool makeQuatRotationLimit(sead::Quatf*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 284 | void makeQuatAxisRotation(sead::Quatf*, const sead::Vector3f&, const sead::Vector3f&, |
| 285 | const sead::Vector3f&, f32); |
| 286 | void makeQuatRotateDegree(sead::Quatf*, const sead::Vector3f&, f32); |
| 287 | void slerpQuat(sead::Quatf*, const sead::Quatf&, const sead::Quatf&, f32); |
| 288 | void calcQuatSide(sead::Vector3f* out, const sead::Quatf& quat); |
| 289 | void calcQuatUp(sead::Vector3f* out, const sead::Quatf& quat); |
| 290 | void calcQuatGravity(sead::Vector3f* out, const sead::Quatf& quat); |
| 291 | void calcQuatFront(sead::Vector3f* out, const sead::Quatf& quat); |
| 292 | f32 calcQuatUpY(const sead::Quatf&); |
| 293 | f32 calcQuatFrontY(const sead::Quatf&); |
| 294 | void calcQuatLocalAxis(sead::Vector3f*, const sead::Quatf&, s32); |
| 295 | void calcQuatLocalSignAxis(sead::Vector3f*, const sead::Quatf&, s32); |
| 296 | void calcQuatRotateDegree(sead::Vector3f*, const sead::Quatf&); |
| 297 | void calcQuatRotateRadian(sead::Vector3f*, const sead::Quatf&); |
| 298 | void calcQuatRotateAxisAndDegree(sead::Vector3f*, f32*, const sead::Quatf&); |
| 299 | void calcQuatRotateAxisAndDegree(sead::Vector3f*, f32*, const sead::Quatf&, const sead::Quatf&); |
| 300 | void rotateQuatRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 301 | void makeQuatXDegree(sead::Quatf* outQuat, f32 angle); |
| 302 | void makeQuatYDegree(sead::Quatf* outQuat, f32 angle); |
| 303 | void makeQuatZDegree(sead::Quatf* outQuat, f32 angle); |
| 304 | void rotateQuatXDirDegree(sead::Quatf*, const sead::Quatf&, f32); |
| 305 | void rotateQuatYDirDegree(sead::Quatf*, const sead::Quatf&, f32); |
| 306 | void rotateQuatZDirDegree(sead::Quatf*, const sead::Quatf&, f32); |
| 307 | void rotateQuatLocalDirDegree(sead::Quatf*, const sead::Quatf&, s32, f32); |
| 308 | void rotateQuatMoment(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&); |
| 309 | void rotateQuatMomentDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&); |
| 310 | void rotateQuatRollBall(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, |
| 311 | const sead::Vector3f&, f32); |
| 312 | void calcMomentRollBall(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 313 | bool turnQuat(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 314 | bool turnQuatXDirRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 315 | bool turnQuatYDirRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 316 | bool turnQuatZDirRadian(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 317 | void turnQuatXDirRate(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 318 | void turnQuatYDirRate(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 319 | void turnQuatZDirRate(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 320 | void tiltQuatDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, const sead::Vector3f&, |
| 321 | f32); |
| 322 | void tiltQuatXDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 323 | void tiltQuatYDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 324 | void tiltQuatZDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 325 | bool turnQuatWithAxisDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, |
| 326 | const sead::Vector3f&, const sead::Vector3f&, f32); |
| 327 | bool turnQuatXDirWithYDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 328 | bool turnQuatXDirWithZDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 329 | bool turnQuatYDirWithZDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 330 | bool turnQuatYDirWithXDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 331 | bool turnQuatZDirWithXDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 332 | bool turnQuatZDirWithYDirDegree(sead::Quatf*, const sead::Quatf&, const sead::Vector3f&, f32); |
| 333 | bool turnQuatZDirToTargetWithAxis(sead::Quatf*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 334 | bool turnQuatFrontToDirDegreeH(sead::Quatf*, const sead::Vector3f&, f32); |
| 335 | void rotateQuatAndTransDegree(sead::Quatf*, sead::Vector3f*, const sead::Quatf&, |
| 336 | const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, |
| 337 | f32); |
| 338 | bool turnVecToVecDegree(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 339 | void turnVecToVecRate(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 340 | bool turnVecToVecCos(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, |
| 341 | const sead::Vector3f&, f32); |
| 342 | bool turnVecToVecCosOnPlane(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 343 | const sead::Vector3f&, f32); |
| 344 | bool turnVecToVecCosOnPlane(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32); |
| 345 | void rotateVectorCenterDegree(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 346 | const sead::Vector3f&, f32); |
| 347 | void rotateVectorDegreeX(sead::Vector3f*, f32); |
| 348 | void rotateVectorDegreeY(sead::Vector3f*, f32); |
| 349 | void rotateVectorDegreeZ(sead::Vector3f*, f32); |
| 350 | void rotateVectorQuat(sead::Vector3f*, const sead::Quatf&); |
| 351 | f32 calcAreaTriangle(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&); |
| 352 | void createBoundingBox(const sead::Vector3f*, u32, sead::Vector3f*, sead::Vector3f*); |
| 353 | void updateBoundingBox(sead::Vector3f, sead::Vector3f*, sead::Vector3f*); |
| 354 | f32 calcDistanceToFarthestBoundingBoxVertex(const sead::Vector3f&, const sead::Vector3f&, |
| 355 | const sead::Vector3f&); |
| 356 | void calcSphereMargeSpheres(sead::Vector3f*, f32*, const sead::Vector3f&, f32, |
| 357 | const sead::Vector3f&, f32); |
| 358 | bool calcCrossLinePoint(sead::Vector2f*, const sead::Vector2f&, const sead::Vector2f&, |
| 359 | const sead::Vector2f&, const sead::Vector2f&); |
| 360 | f32 calcSquaredDistanceSegmentToSegment(const sead::Vector3f&, const sead::Vector3f&, |
| 361 | const sead::Vector3f&, const sead::Vector3f&, |
| 362 | sead::Vector3f*, sead::Vector3f*); |
| 363 | f32 calcSquaredDistancePointToSegment(const sead::Vector3f&, const sead::Vector3f&, |
| 364 | const sead::Vector3f&); |
| 365 | f32 calcDistancePointToSegment(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&); |
| 366 | void (sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 367 | const sead::Vector3f&); |
| 368 | void calcClosestSegmentPoint(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 369 | const sead::Vector3f&); |
| 370 | f32 calcCylinderRadiusDot(const sead::Vector3f&, const sead::Vector3f&, f32); |
| 371 | bool checkHitSemilinePlane(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 372 | const sead::Vector3f&, const sead::Vector3f&); |
| 373 | bool checkHitSegmentPlane(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 374 | const sead::Vector3f&, const sead::Vector3f&, bool); |
| 375 | bool checkHitLinePlane(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 376 | const sead::Vector3f&, const sead::Vector3f&); |
| 377 | bool checkHitSegmentSphere(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, f32, |
| 378 | sead::Vector3f*, sead::Vector3f*); |
| 379 | bool checkHitSegmentSphereNearDepth(const sead::Vector3f&, const sead::Vector3f&, |
| 380 | const sead::Vector3f&, f32, sead::Vector3f*, sead::Vector3f*); |
| 381 | bool checkInCylinder(const sead::Vector3f&, const sead::Vector3f&, f32, const sead::Vector3f&, f32); |
| 382 | bool checkHitSegmentCylinder(const sead::Vector3f&, f32, const sead::Vector3f&, f32, |
| 383 | const sead::Vector3f&, const sead::Vector3f&, sead::Vector3f*, |
| 384 | sead::Vector3f*); |
| 385 | bool checkHitHalfLineSphere(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, |
| 386 | f32); |
| 387 | |
| 388 | } // namespace al |
| 389 | |
| 390 | namespace Intersect { |
| 391 | |
| 392 | bool calcX(sead::Vector3f* outVec, f32 value, const sead::Vector3f& vectorA, |
| 393 | const sead::Vector3f& vectorB, const sead::Vector3f& min, const sead::Vector3f& max); |
| 394 | bool calcY(sead::Vector3f* outVec, f32 value, const sead::Vector3f& vectorA, |
| 395 | const sead::Vector3f& vectorB, const sead::Vector3f& min, const sead::Vector3f& max); |
| 396 | bool calcZ(sead::Vector3f* outVec, f32 value, const sead::Vector3f& vectorA, |
| 397 | const sead::Vector3f& vectorB, const sead::Vector3f& min, const sead::Vector3f& max); |
| 398 | |
| 399 | } // namespace Intersect |
| 400 | |
| 401 | namespace al { |
| 402 | |
| 403 | bool checkHitSegmentBox(const sead::Vector3f&, const sead::Vector3f&, const sead::BoundBox3f&, |
| 404 | sead::Vector3f*); |
| 405 | bool checkHitPointCone(const sead::Vector3f&, const sead::Vector3f&, const sead::Vector3f&, f32, |
| 406 | f32); |
| 407 | bool checkHitSphereCone(const sead::Vector3f&, f32, const sead::Vector3f&, const sead::Vector3f&, |
| 408 | f32, f32); |
| 409 | bool checkHitSphereSpotLight(const sead::Vector3f&, f32, const sead::Vector3f&, |
| 410 | const sead::Vector3f&, f32, f32); |
| 411 | bool calcBoundingSphereSpotLight(sead::Vector3f*, f32*, const sead::Vector3f&, |
| 412 | const sead::Vector3f&, f32, f32); |
| 413 | void calcBoundingSphereBox3f(sead::Vector3f*, f32*, const sead::BoundBox3f&); |
| 414 | void calcArrowAabb(sead::BoundBox3f*, const sead::Vector3f&, const sead::Vector3f&); |
| 415 | bool isNearCollideSphereAabb(const sead::Vector3f&, f32, const sead::BoundBox3f&); |
| 416 | void calcBoxFacePoint(sead::Vector3f[4], const sead::BoundBox3f&, Axis); |
| 417 | void calcBoxFacePoint(sead::Vector3f[4], const sead::BoundBox3f&, Axis, const sead::Matrix34f&); |
| 418 | void calcBoxFacePoint(sead::Vector3f[4], const sead::BoundBox3f&, Axis, const sead::Quatf&, |
| 419 | const sead::Vector3f&); |
| 420 | void calcFittingBoxPoseEqualAxisAll(sead::Quatf*, const sead::Quatf&, const sead::Quatf&); |
| 421 | void calcFittingBoxPoseEqualAxisNone(sead::Quatf*, const sead::Quatf&, const sead::Quatf&); |
| 422 | void calcFittingBoxPoseEqualAxisTwo(sead::Quatf*, const sead::Quatf&, const sead::Quatf&, s32); |
| 423 | void calcFittingBoxPose(sead::Quatf*, const sead::BoundBox3f&, const sead::Quatf&, |
| 424 | const sead::Quatf&); |
| 425 | f32 calcSquaredDistanceToObb(const sead::Vector3f&, const sead::Matrix34f&, const sead::Vector3f&); |
| 426 | f32 calcDistanceToObb(const sead::Vector3f&, const sead::Matrix34f&, const sead::Vector3f&); |
| 427 | f32 calcSquaredDistanceToObb(const sead::Vector3f&, const sead::Matrix34f&, const sead::Vector3f&, |
| 428 | const sead::BoundBox3f&); |
| 429 | f32 calcDistanceToObb(const sead::Vector3f&, const sead::Matrix34f&, const sead::Vector3f&, |
| 430 | const sead::BoundBox3f&); |
| 431 | f32 calcSquaredDistanceToObb(const sead::Vector3f&, const sead::Matrix34f&); |
| 432 | f32 calcDistanceToObb(const sead::Vector3f&, const sead::Matrix34f&); |
| 433 | void calcObbCorners(sead::Vector3f*, const sead::Matrix34f&, const sead::BoundBox3f&); |
| 434 | bool calcTriangleInteriorAngleDegree(f32*, f32*, f32*, f32, f32, f32); |
| 435 | bool calcBetweenTwoLinkMtx(sead::Matrix34f*, sead::Matrix34f*, sead::Matrix34f*, |
| 436 | const sead::Vector3f&, const sead::Vector3f&, f32, f32); |
| 437 | bool calcBetweenTwoLinkPos(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, f32, f32, |
| 438 | const sead::Vector3f&); |
| 439 | bool calcReflectionVector(sead::Vector3f*, const sead::Vector3f&, f32, f32); |
| 440 | void calcReverseVector(sead::Vector3f*, const sead::Vector3f&, f32); |
| 441 | void calcParabolicFunctionParam(f32*, f32*, f32, f32 verticalDistance); |
| 442 | f32 calcConvergeVibrationValue(f32, f32, f32, f32, f32); |
| 443 | bool calcSphericalPolarCoordPY(sead::Vector2f*, const sead::Vector3f&, const sead::Vector3f&, |
| 444 | const sead::Vector3f&); |
| 445 | void calcBezierPoint(sead::Vector3f*, const sead::Vector3f&, const sead::Vector3f&, |
| 446 | const sead::Vector3f&, const sead::Vector3f&, f32); |
| 447 | f32 calcSpringDumperForce(f32, f32, f32, f32); |
| 448 | f32 convertSpringEnergyToSpeed(f32, f32, f32); |
| 449 | const char* axisIndexToString(s32); |
| 450 | void visitCellsOverlapped(const sead::Vector3f&, const sead::Vector3f&, f32, |
| 451 | const VisitCellCallBack&); |
| 452 | f32 calcMultValueToDestination(u32, f32, f32); |
| 453 | f32 getHaltonSequence(u32, u32); |
| 454 | f32 calcFractal(f32, f32, u32, f32, f32, f32, bool); |
| 455 | f32 calcMultiFractal(f32, f32, f32, u32, f32, f32, f32, bool); |
| 456 | f32 calcNormalDistribution(f32, f32, f32); |
| 457 | bool calcVecViewInput(sead::Vector3f*, const sead::Vector2f&, const sead::Vector3f&, |
| 458 | const sead::Matrix34f*); |
| 459 | bool calcDirViewInput(sead::Vector3f*, const sead::Vector2f&, const sead::Vector3f&, |
| 460 | const sead::Matrix34f*); |
| 461 | bool calcVecViewInput2D(sead::Vector3f*, const sead::Vector2f&, const sead::Vector3f&, |
| 462 | const sead::Matrix34f*); |
| 463 | bool calcDirViewInput2D(sead::Vector3f*, const sead::Vector2f&, const sead::Vector3f&, |
| 464 | const sead::Matrix34f*); |
| 465 | void calcBendPosAndFront(sead::Vector3f*, sead::Vector3f*, sead::Vector3f&, f32, |
| 466 | const sead::Vector3f&, const sead::Vector3f&, f32); |
| 467 | void calcCirclePointPicking(sead::Vector2f* outPoint, f32 x, f32 y); |
| 468 | void pickUniformPointsOnCircleHammersley(sead::Vector2f* outPoint, f32 x, f32 y); |
| 469 | void calcDiskPointPicking(sead::Vector2f* outPoint, f32 radius, f32 angle); |
| 470 | void pickUniformPointsOnDiskHammersley(sead::Vector2f* outPoint, u32 x, u32 y); |
| 471 | void pickUniformPointOnDisk(sead::Vector2f* outPoint); |
| 472 | void calcSpherePointPicking(sead::Vector3f* outPoint, f32 x, f32 y); |
| 473 | void pickUniformPointOnSphere(sead::Vector3f* outPoint); |
| 474 | void makeBayerMatrix(s32*, s32); |
| 475 | u16 f32ToF16(f32); |
| 476 | f32 f16ToF32(u16); |
| 477 | |
| 478 | } // namespace al |
| 479 | |