2024-04-09 05:25:24 -04:00
|
|
|
#include "legoedge.h"
|
|
|
|
|
|
|
|
#include "decomp.h"
|
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(LegoEdge, 0x24)
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1009a470
|
|
|
|
LegoEdge::LegoEdge()
|
|
|
|
{
|
|
|
|
m_faceA = NULL;
|
|
|
|
m_faceB = NULL;
|
|
|
|
m_ccwA = NULL;
|
|
|
|
m_cwA = NULL;
|
|
|
|
m_ccwB = NULL;
|
|
|
|
m_cwB = NULL;
|
|
|
|
m_pointA = NULL;
|
|
|
|
m_pointB = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1009a4c0
|
|
|
|
LegoEdge::~LegoEdge()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1009a4d0
|
2024-05-19 15:41:07 -04:00
|
|
|
LegoEdge* LegoEdge::GetClockwiseEdge(LegoWEEdge& p_face)
|
2024-04-09 05:25:24 -04:00
|
|
|
{
|
2024-05-19 15:41:07 -04:00
|
|
|
if (&p_face == m_faceA) {
|
2024-04-09 05:25:24 -04:00
|
|
|
return m_cwA;
|
|
|
|
}
|
2024-05-19 15:41:07 -04:00
|
|
|
else if (&p_face == m_faceB) {
|
2024-04-09 05:25:24 -04:00
|
|
|
return m_cwB;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1009a4f0
|
2024-05-19 15:41:07 -04:00
|
|
|
LegoEdge* LegoEdge::GetCounterclockwiseEdge(LegoWEEdge& p_face)
|
2024-04-09 05:25:24 -04:00
|
|
|
{
|
2024-05-19 15:41:07 -04:00
|
|
|
if (&p_face == m_faceA) {
|
2024-04-09 05:25:24 -04:00
|
|
|
return m_ccwA;
|
|
|
|
}
|
2024-05-19 15:41:07 -04:00
|
|
|
else if (&p_face == m_faceB) {
|
2024-04-09 05:25:24 -04:00
|
|
|
return m_ccwB;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1009a510
|
2024-05-30 20:04:06 -04:00
|
|
|
Vector3* LegoEdge::CWVertex(LegoWEEdge& p_face)
|
2024-04-09 05:25:24 -04:00
|
|
|
{
|
2024-05-19 15:41:07 -04:00
|
|
|
return &p_face == m_faceA ? m_pointB : m_pointA;
|
2024-04-09 05:25:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1009a530
|
2024-05-19 15:41:07 -04:00
|
|
|
Vector3* LegoEdge::CCWVertex(LegoWEEdge& p_face)
|
2024-04-09 05:25:24 -04:00
|
|
|
{
|
2024-05-19 15:41:07 -04:00
|
|
|
return &p_face == m_faceB ? m_pointB : m_pointA;
|
2024-04-09 05:25:24 -04:00
|
|
|
}
|