Isle
Loading...
Searching...
No Matches
legowegedge.h
Go to the documentation of this file.
1#ifndef __LEGOWEGEDGE_H
2#define __LEGOWEGEDGE_H
3
12 {
14 m_data = 0;
15 m_unk0x08 = 0.0f;
16 }
17
19 unsigned int m_data;
20 float m_unk0x08;
21};
22
25
31class LegoWEGEdge : public LegoWEEdge {
32public:
34 enum {
35 c_bit1 = 0x01,
36 c_bit2 = 0x02,
37 c_bit3 = 0x04,
38 c_bit5 = 0x10
39 };
40
44
47 ~LegoWEGEdge() override;
48
52 LegoS32 VTable0x04() override; // vtable+0x04
53
58 {
59 if (m_flags & c_bit5) {
60 return FALSE;
61 }
62 else {
63 return TRUE;
64 }
65 }
66
71
75 Mx4DPointFloat* GetEdgeNormal(int index) { return &m_edgeNormals[index]; }
76
79 const LegoChar* GetName() { return m_name; }
80
85 void SetFlag0x10(LegoU32 p_disable)
86 {
87 if (p_disable) {
88 m_flags &= ~c_bit5;
89 }
90 else {
91 m_flags |= c_bit5;
92 }
93 }
94
99
101 friend class LegoPathController;
102
103protected:
108
115 float m_unk0x44;
119};
120
121#endif // __LEGOWEGEDGE_H
[AI] Manager for controlling actors' movement along predefined geometric paths.
[AI] Represents a trigger/control element in the LEGO world's path system, linked logically to the wo...
[AI] Represents a face (polygon) composed of a list of edges in the LEGO Island world engine.
Definition: legoweedge.h:17
[AI] Represents a "geometry edge" in the LEGO Island world polygon/path system.
Definition: legowegedge.h:31
const LegoChar * GetName()
[AI] Returns the name string of this edge, typically used for debugging and lookup.
Definition: legowegedge.h:79
Mx4DPointFloat m_unk0x14
[AI] 4D plane equation or normal used for polygon/edge side tests. [AI]
Definition: legowegedge.h:112
float m_unk0x44
[AI] Maximum squared distance from center—polygon bounding radius or similar. [AI]
Definition: legowegedge.h:115
LegoS32 VTable0x04() override
[AI] Performs geometry calculations for the edge, sets up normals, center point, and trigger vectors.
Definition: legowegedge.cpp:47
LegoU8 m_unk0x0d
[AI] Unknown, used for internal status/tracking. [AI]
Definition: legowegedge.h:110
LegoU8 GetMask0x03()
[AI] Returns a two-bit mask of the first two edge state flags (bit1, bit2).
Definition: legowegedge.h:98
LegoU8 m_numTriggers
[AI] Number of trigger (path/segment) structures attached to this edge. [AI]
Definition: legowegedge.h:116
Mx3DPointFloat * m_unk0x50
[AI] Transition direction/unit vector—used for edge trigger geometry. [AI]
Definition: legowegedge.h:118
Mx4DPointFloat * m_edgeNormals
[AI] Per-edge normals for each polygon segment, allocated dynamically. [AI]
Definition: legowegedge.h:113
LegoU32 GetFlag0x10()
Returns TRUE if the 'disabled' flag is not set, otherwise FALSE.
Definition: legowegedge.h:57
LegoS32 FUN_1009aea0()
[AI] Internal routine called by VTable0x04 for validity checking of polygon vertices and normal consi...
LegoWEGEdge()
[AI] Constructs a LegoWEGEdge and initializes its member variables.
Definition: legowegedge.cpp:12
LegoU8 m_flags
[AI] Flags indicating edge state, enabled/disabled, and type bits. [AI]
Definition: legowegedge.h:109
Mx4DPointFloat * GetEdgeNormal(int index)
[AI] Returns a pointer to the 4D edge normal at the given sub-edge index.
Definition: legowegedge.h:75
Mx4DPointFloat * GetUnknown0x14()
[AI] Returns a pointer to the cached 4D normal or reference plane for the edge.
Definition: legowegedge.h:70
@ c_bit1
[AI] Edge-specific flag (purpose determined by logic in edge processing)
Definition: legowegedge.h:35
@ c_bit2
[AI]
Definition: legowegedge.h:36
@ c_bit5
[AI] Disabled flag mask (see GetFlag0x10/SetFlag0x10) [AI]
Definition: legowegedge.h:38
@ c_bit3
[AI]
Definition: legowegedge.h:37
LegoChar * m_name
[AI] Edge's name string, dynamically allocated for debug/lookup. [AI]
Definition: legowegedge.h:111
PathWithTrigger * m_pathTrigger
[AI] Array of triggers influencing entity motion or event logic on this edge. [AI]
Definition: legowegedge.h:117
~LegoWEGEdge() override
[AI] Destroys this edge instance and properly deallocates memory for associated dynamic members.
Definition: legowegedge.cpp:25
void SetFlag0x10(LegoU32 p_disable)
[AI] Sets the enabled/disabled flag for this edge.
Definition: legowegedge.h:85
Mx3DPointFloat m_unk0x30
[AI] Cached center for the edge polygon, used in geometric calculations. [AI]
Definition: legowegedge.h:114
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
Definition: mxgeometry3d.h:14
[AI] 4D point class for floating point values.
Definition: mxgeometry4d.h:18
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
Definition: legotypes.h:71
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
Definition: legotypes.h:83
unsigned char LegoU8
[AI] Unsigned 8-bit integer type used throughout LEGO Island.
Definition: legotypes.h:47
long LegoS32
[AI] Signed 32-bit integer type for cross-platform compatibility.
Definition: legotypes.h:65
[AI] Represents a path segment with an associated trigger in LEGO Island pathing logic.
Definition: legowegedge.h:8
LegoPathStruct * m_pathStruct
[AI] Pointer to a path structure associated with this trigger. [AI]
Definition: legowegedge.h:18
float m_unk0x08
[AI] Distance along the path or trigger threshold (exact semantics unclear). [AI]
Definition: legowegedge.h:20
unsigned int m_data
[AI] Miscellaneous data value, use determined by path logic. [AI]
Definition: legowegedge.h:19
PathWithTrigger()
[AI] Constructs a PathWithTrigger and initializes its members to default values.
Definition: legowegedge.h:11