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

Function xMat3x3LookVec3

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

Source from the content-addressed store, hash-verified

2567 mat.at *= 1.0f / len;
2568 F32 absx = xabs(mat.at.x);
2569 F32 absy = xabs(mat.at.y);
2570 F32 absz = xabs(mat.at.z);
2571 if (absx < absy && absx < absz)
2572 {
2573 mat.right.assign(0.0f, absz, -absy);
2574 }
2575 else
2576 {
2577 if (absy < absz)
2578 {
2579 mat.right.assign(-mat.at.z, 0.0f, mat.at.x);
2580 }
2581 else
2582 {
2583 mat.right.assign(mat.at.y, -mat.at.x, 0.0f);
2584 }
2585 }
2586 mat.right.normalize();
2587 mat.up = mat.at.cross(mat.right);
2588 }
2589 return len;
2590}
2591
2592void xModelAnimCollRestore(const xModelInstance&)
2593{
2594}
2595
2596void xModelAnimCollApply(const xModelInstance&)
2597{
2598}
2599
2600bool xModelAnimCollDirty(const xModelInstance&)
2601{
2602 return false;
2603}
2604
2605// Make these into inline definitions somewhere appropriate later
2606xVec3 xVec3::operator+(const xVec3& v) const

Callers 2

emit_decalMethod · 0.85
emit_decal_distMethod · 0.85

Calls 2

lengthMethod · 0.80
crossMethod · 0.80

Tested by

no test coverage detected