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

Function xEntRotationToMatrix

src/SB/Core/x/xEnt.cpp:1064–1080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062}
1063
1064static void xEntRotationToMatrix(xEntFrame* frame)
1065{
1066 if (frame->mode & 0x20)
1067 {
1068 if (frame->mode & 0x400)
1069 {
1070 xVec3AddTo(&frame->rot.axis, &frame->drot.axis);
1071 xMat3x3Euler(&frame->mat, frame->rot.axis.x, frame->rot.axis.y, frame->rot.axis.z);
1072 }
1073 else
1074 {
1075 frame->rot.angle = xAngleClamp(frame->rot.angle + frame->drot.angle);
1076
1077 xMat3x3Rot(&frame->mat, &frame->rot.axis, frame->rot.angle);
1078 }
1079 }
1080}
1081
1082void xEntMotionToMatrix(xEnt* ent, xEntFrame* frame)
1083{

Callers 1

xEntMotionToMatrixFunction · 0.85

Calls 4

xVec3AddToFunction · 0.85
xMat3x3EulerFunction · 0.85
xMat3x3RotFunction · 0.85
xAngleClampFunction · 0.70

Tested by

no test coverage detected