isle-portable/LEGO1/lego/sources/geom/legoedge.cpp
Christian Semmler d62054db2e
Updates from isledecomp/isle (#1)
* Implement/match LegoAnimationManager::FUN_10064b50 (#926)

* Implement/match LegoAnimationManager::FUN_10063d10 (#927)

* Implement/match LegoAnimationManager::FUN_10064380 (#928)

* Implement/match LegoAnimationManager::FUN_10064380

* Fix naming

* Revert

* Implement/matche LegoAnimationManager::FUN_10064740 and FUN_10064670 (#929)

* Implement/match FUN_1003ef00 and related (#931)

* Implement/match LegoAnimationManager::FUN_10064120 (#932)

* Implement/match LegoAnimationManager::FUN_10064120

* Fix naming

* Fix parentheses

* Implement LegoAnimationManager::FUN_10064010 (#933)

* Implement/match ViewManager::FUN_100a6150 (#934)

* Implement/match PlayCamAnim and CameraTriggerFire (#935)

* Implement/match PlayCamAnim and CameraTriggerFire

* Fix type

* Name var

* Implement/match LegoAnimationManager::FUN_10063fb0 (#936)

* basic name improvements (#930)

* basic name improvements

* clang-format

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>

* Implement/match LegoPathBoundary::Intersect (#937)

* Implement LegoPathActor::VTable0x68 (#938)

* Implement LegoPathActor::VTable0x68

* Fix naming

* Implement/match LegoPathBoundary::FUN_100575b0 (#939)

* Implement LegoUnknown::FUN_1009a1e0 (#940)

* Implement/match LegoPathController::FUN_1004a240 (#941)

* Implement LegoPathActor::VTable0x9c (#942)

* Implement LegoPathActor::VTable0x9c

* Add annotation

* Implement/match LegoPathActor::SwitchBoundary (#943)

* Implement/match LegoPathActor::SwitchBoundary

* Rename var

* Implement/match LegoPathStruct (#944)

* Implement/match LegoPathStruct

* Rename some nums

* Consistent naming

* Naming

* relax regex

* Name some functions

* Improve naming

* Rename

* Implement/match LegoPathActor::VTable0xa4 and VTable0xa8 (#945)

* Implement/match LegoPathActor::VTable0xa4

* Implement/match LegoPathActor::VTable0xa8

* Name enum constants

---------

Co-authored-by: Cameron <25990062+crtdll@users.noreply.github.com>
2024-05-23 18:09:49 +02:00

64 lines
1.0 KiB
C++

#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
LegoEdge* LegoEdge::GetClockwiseEdge(LegoWEEdge& p_face)
{
if (&p_face == m_faceA) {
return m_cwA;
}
else if (&p_face == m_faceB) {
return m_cwB;
}
else {
return NULL;
}
}
// FUNCTION: LEGO1 0x1009a4f0
LegoEdge* LegoEdge::GetCounterclockwiseEdge(LegoWEEdge& p_face)
{
if (&p_face == m_faceA) {
return m_ccwA;
}
else if (&p_face == m_faceB) {
return m_ccwB;
}
else {
return NULL;
}
}
// FUNCTION: LEGO1 0x1009a510
Vector3* LegoEdge::GetOpposingPoint(LegoWEEdge& p_face)
{
return &p_face == m_faceA ? m_pointB : m_pointA;
}
// FUNCTION: LEGO1 0x1009a530
Vector3* LegoEdge::CCWVertex(LegoWEEdge& p_face)
{
return &p_face == m_faceB ? m_pointB : m_pointA;
}