MCPcopy Create free account
hub / github.com/doldecomp/mkdd / updateParameter

Method updateParameter

src/Sato/ObjCollision.cpp:200–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void ObjColCube::updateParameter(Mtx matrix)
201{
202 // transform verts
203 JGeometry::TVec3f t[5];
204 JGeometry::TVec3f *src = mVertices, *dst = t;
205 for (u8 i = 0; i < 5; i++, src++, dst++) {
206 PSMTXMultVec(matrix, src, dst);
207 }
208
209 JGeometry::TVec3f normal;
210
211 JGeometry::TVec3f *vertex = t;
212 stPlaneParam *plane = mSidePlanes;
213 for (u8 i = 0; i < 4; i++, plane++, vertex++) {
214 normal.set(plane->x, plane->y, plane->z);
215 stMakePlaneParam(*plane, normal, *vertex);
216 }
217
218 normal.set(mTopPlane.x, mTopPlane.y, mTopPlane.z);
219 stMakePlaneParam(mTopPlane, normal, t[4]);
220}
221
222bool ObjColCube::chkIsHitQuad(const JGeometry::TVec3f &spherePos, const f32 &radius)
223{

Callers

nothing calls this directly

Calls 2

stMakePlaneParamFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected