MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / SweptSphereModelCB

Function SweptSphereModelCB

src/SB/Core/x/xCollide.cpp:2004–2031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2002 {
2003 triSlot = *triIndex++;
2004 RpTriangle* tri = &triangles[triSlot];
2005 S32 vertIndex0 = tri->vertIndex[0];
2006 S32 vertIndex1 = tri->vertIndex[1];
2007 S32 vertIndex2 = tri->vertIndex[2];
2008 RwV3d* v0 = &vertices[vertIndex0];
2009 RwV3d* v1 = &vertices[vertIndex1];
2010 RwV3d* v2 = &vertices[vertIndex2];
2011 if (xSweptSphereToTriangle(sws, (xVec3*)v0, (xVec3*)v1, (xVec3*)v2))
2012 {
2013 sSweptSphereHitFound = 1;
2014 }
2015 }
2016
2017 return 1;
2018}
2019
2020S32 xSweptSphereToModel(xSweptSphere* sws, RpAtomic* model, RwMatrix* mat)
2021{
2022 if (!sws->dist)
2023 return 0;
2024
2025 sSweptSphereHitFound = 0;
2026 sSwsModelMat = (xMat4x3*)mat;
2027
2028 xMat4x3 oldinvbasis = sws->invbasis.xm;
2029 xMat4x3Mul(&sws->invbasis.xm, (xMat4x3*)mat, &sws->invbasis.xm);
2030
2031 RpGeometry* geom = model->geometry;
2032 RpCollisionData* colldata = RpCollisionGeometryGetData(geom);
2033 RwLine line;
2034

Callers

nothing calls this directly

Calls 1

xSweptSphereToTriangleFunction · 0.70

Tested by

no test coverage detected