mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Implement/match LegoEntity::SetLocation (#629)
* Implement/match LegoEntity::SetLocation * Remove comment
This commit is contained in:

committed by
GitHub

parent
3b2bd0e9d4
commit
a93e2ae0d3
@@ -85,9 +85,9 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
if (p_bool2) {
|
||||
MxMatrix mat;
|
||||
CalcLocalTransform(
|
||||
Mx3DPointFloat(m_worldLocation.GetX(), m_worldLocation.GetY(), m_worldLocation.GetZ()),
|
||||
Mx3DPointFloat(m_worldDirection.GetX(), m_worldDirection.GetY(), m_worldDirection.GetZ()),
|
||||
Mx3DPointFloat(m_worldUp.GetX(), m_worldUp.GetY(), m_worldUp.GetZ()),
|
||||
Mx3DPointFloat(m_worldLocation[0], m_worldLocation[1], m_worldLocation[2]),
|
||||
Mx3DPointFloat(m_worldDirection[0], m_worldDirection[1], m_worldDirection[2]),
|
||||
Mx3DPointFloat(m_worldUp[0], m_worldUp[1], m_worldUp[2]),
|
||||
mat
|
||||
);
|
||||
|
||||
@@ -106,10 +106,38 @@ void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x100109b0
|
||||
void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool)
|
||||
// FUNCTION: LEGO1 0x100109b0
|
||||
void LegoEntity::SetLocation(const Vector3& p_location, const Vector3& p_direction, const Vector3& p_up, MxBool p_und)
|
||||
{
|
||||
// TODO
|
||||
Mx3DPointFloat direction;
|
||||
Mx3DPointFloat up;
|
||||
|
||||
direction = p_direction;
|
||||
direction.Unitize();
|
||||
|
||||
up = p_up;
|
||||
up.Unitize();
|
||||
|
||||
m_worldLocation = p_location;
|
||||
m_worldDirection = direction;
|
||||
m_worldUp = up;
|
||||
|
||||
if (m_roi != NULL) {
|
||||
MxMatrix mat;
|
||||
CalcLocalTransform(
|
||||
Mx3DPointFloat(p_location[0], p_location[1], p_location[2]),
|
||||
Mx3DPointFloat(direction[0], direction[1], direction[2]),
|
||||
Mx3DPointFloat(up[0], up[1], up[2]),
|
||||
mat
|
||||
);
|
||||
|
||||
m_roi->FUN_100a46b0(mat);
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->Moved(*m_roi);
|
||||
|
||||
if (p_und) {
|
||||
FUN_10010c30();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10010c30
|
||||
|
Reference in New Issue
Block a user