isle-portable/LEGO1/realtime/realtime.cpp
jonschz 1a15981324
Implement LegoCarBuildAnimPresenter::StreamingTickle() (#1109)
* Implement LegoCarBuildAnimPresenter::StreamingTickle and dependents

* Fix naming issue

* Address review comment

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2024-10-05 16:20:45 -07:00

21 lines
597 B
C++

#include "realtime.h"
#include <vec.h>
// FUNCTION: LEGO1 0x100a5b40
// FUNCTION: BETA10 0x10168127
void CalcLocalTransform(const Vector3& p_posVec, const Vector3& p_dirVec, const Vector3& p_upVec, Matrix4& p_outMatrix)
{
float x_axis[3], y_axis[3], z_axis[3];
NORMVEC3(z_axis, p_dirVec);
NORMVEC3(y_axis, p_upVec)
VXV3(x_axis, y_axis, z_axis);
NORMVEC3(x_axis, x_axis);
VXV3(y_axis, z_axis, x_axis);
NORMVEC3(y_axis, y_axis);
SET4from3(p_outMatrix[0], x_axis, 0);
SET4from3(p_outMatrix[1], y_axis, 0);
SET4from3(p_outMatrix[2], z_axis, 0);
SET4from3(p_outMatrix[3], p_posVec, 1);
}