mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Matrix/vector refactor (#426)
This commit is contained in:

committed by
GitHub

parent
eac096036a
commit
d24f5db42f
@@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(LegoCameraController, 0xc8);
|
||||
// FUNCTION: LEGO1 0x10011d50
|
||||
LegoCameraController::LegoCameraController()
|
||||
{
|
||||
SetWorldTransform(Vector3Data(0, 0, 0), Vector3Data(0, 0, 1), Vector3Data(0, 1, 0));
|
||||
SetWorldTransform(Mx3DPointFloat(0, 0, 0), Mx3DPointFloat(0, 0, 1), Mx3DPointFloat(0, 1, 0));
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10011f70
|
||||
@@ -71,37 +71,49 @@ void LegoCameraController::OnMouseMove(MxU8 p_modifier, MxPoint32 p_point)
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10012260
|
||||
void LegoCameraController::SetWorldTransform(const Vector3Impl& p_at, const Vector3Impl& p_dir, const Vector3Impl& p_up)
|
||||
void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up)
|
||||
{
|
||||
CalcLocalTransform(p_at, p_dir, p_up, m_matrix1);
|
||||
m_matrix2 = m_matrix1;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100123e0
|
||||
void LegoCameraController::FUN_100123e0(Matrix4Data& p_transform, MxU32)
|
||||
void LegoCameraController::FUN_100123e0(MxMatrix& p_transform, MxU32)
|
||||
{
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10012740
|
||||
Vector3Data& LegoCameraController::FUN_10012740()
|
||||
// FUNCTION: LEGO1 0x10012740
|
||||
Mx3DPointFloat LegoCameraController::GetWorldUp()
|
||||
{
|
||||
// Actually returns reference to a member
|
||||
static Vector3Data g_v;
|
||||
return g_v;
|
||||
if (m_lego3DView && m_lego3DView->GetPointOfView()) {
|
||||
Mx3DPointFloat vec;
|
||||
vec = m_lego3DView->GetPointOfView()->GetWorldUp();
|
||||
return Mx3DPointFloat(vec[0], vec[1], vec[2]);
|
||||
}
|
||||
else
|
||||
return Mx3DPointFloat(0, 0, 0);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100127f0
|
||||
Vector3Data& LegoCameraController::FUN_100127f0()
|
||||
// FUNCTION: LEGO1 0x100127f0
|
||||
Mx3DPointFloat LegoCameraController::GetWorldLocation()
|
||||
{
|
||||
// Actually returns reference to a member
|
||||
static Vector3Data g_v;
|
||||
return g_v;
|
||||
if (m_lego3DView && m_lego3DView->GetPointOfView()) {
|
||||
Mx3DPointFloat vec;
|
||||
vec = m_lego3DView->GetPointOfView()->GetWorldPosition();
|
||||
return Mx3DPointFloat(vec[0], vec[1] - m_entityOffsetUp, vec[2]);
|
||||
}
|
||||
else
|
||||
return Mx3DPointFloat(0, 0, 0);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100128a0
|
||||
Vector3Data& LegoCameraController::FUN_100128a0()
|
||||
// FUNCTION: LEGO1 0x100128a0
|
||||
Mx3DPointFloat LegoCameraController::GetWorldDirection()
|
||||
{
|
||||
// Actually returns reference to a member
|
||||
static Vector3Data g_v;
|
||||
return g_v;
|
||||
if (m_lego3DView && m_lego3DView->GetPointOfView()) {
|
||||
Mx3DPointFloat vec;
|
||||
vec = m_lego3DView->GetPointOfView()->GetWorldDirection();
|
||||
return Mx3DPointFloat(vec[0], vec[1], vec[2]);
|
||||
}
|
||||
else
|
||||
return Mx3DPointFloat(0, 0, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user