Isle
|
[AI] Represents a "geometry edge" in the LEGO Island world polygon/path system. More...
#include <legowegedge.h>
Public Types | |
enum | { c_bit1 = 0x01 , c_bit2 = 0x02 , c_bit3 = 0x04 , c_bit5 = 0x10 } |
[AI] Flags controlling various edge behaviors and states. [AI] More... | |
Public Member Functions | |
LegoWEGEdge () | |
[AI] Constructs a LegoWEGEdge and initializes its member variables. More... | |
~LegoWEGEdge () override | |
[AI] Destroys this edge instance and properly deallocates memory for associated dynamic members. More... | |
LegoS32 | VTable0x04 () override |
[AI] Performs geometry calculations for the edge, sets up normals, center point, and trigger vectors. More... | |
LegoU32 | GetFlag0x10 () |
Returns TRUE if the 'disabled' flag is not set, otherwise FALSE. More... | |
Mx4DPointFloat * | GetUnknown0x14 () |
[AI] Returns a pointer to the cached 4D normal or reference plane for the edge. More... | |
Mx4DPointFloat * | GetEdgeNormal (int index) |
[AI] Returns a pointer to the 4D edge normal at the given sub-edge index. More... | |
const LegoChar * | GetName () |
[AI] Returns the name string of this edge, typically used for debugging and lookup. More... | |
void | SetFlag0x10 (LegoU32 p_disable) |
[AI] Sets the enabled/disabled flag for this edge. More... | |
LegoU8 | GetMask0x03 () |
[AI] Returns a two-bit mask of the first two edge state flags (bit1, bit2). More... | |
![]() | |
LegoWEEdge () | |
[AI] Constructs a LegoWEEdge with no edges. More... | |
virtual | ~LegoWEEdge () |
[AI] Destroys the LegoWEEdge object, releasing memory used by its edge list. More... | |
virtual LegoS32 | VTable0x04 () |
[AI] Connects and links the associated edge objects to set up adjacency across the face. More... | |
LegoU8 | GetNumEdges () |
[AI] Returns the number of edge elements assigned to this face. More... | |
LegoUnknown100db7f4 ** | GetEdges () |
[AI] Gets the array of pointers to the edge objects that form this face. More... | |
LegoU32 | IsEqual (LegoWEEdge *p_other) |
[AI] Checks if this face object is the same as another. More... | |
void | SetEdges (LegoUnknown100db7f4 **p_edges, LegoU8 p_numEdges) |
[AI] Assigns the edge list and count for this face. More... | |
Protected Member Functions | |
LegoS32 | FUN_1009aea0 () |
[AI] Internal routine called by VTable0x04 for validity checking of polygon vertices and normal consistency. More... | |
Protected Attributes | |
LegoU8 | m_flags |
[AI] Flags indicating edge state, enabled/disabled, and type bits. [AI] More... | |
LegoU8 | m_unk0x0d |
[AI] Unknown, used for internal status/tracking. [AI] More... | |
LegoChar * | m_name |
[AI] Edge's name string, dynamically allocated for debug/lookup. [AI] More... | |
Mx4DPointFloat | m_unk0x14 |
[AI] 4D plane equation or normal used for polygon/edge side tests. [AI] More... | |
Mx4DPointFloat * | m_edgeNormals |
[AI] Per-edge normals for each polygon segment, allocated dynamically. [AI] More... | |
Mx3DPointFloat | m_unk0x30 |
[AI] Cached center for the edge polygon, used in geometric calculations. [AI] More... | |
float | m_unk0x44 |
[AI] Maximum squared distance from center—polygon bounding radius or similar. [AI] More... | |
LegoU8 | m_numTriggers |
[AI] Number of trigger (path/segment) structures attached to this edge. [AI] More... | |
PathWithTrigger * | m_pathTrigger |
[AI] Array of triggers influencing entity motion or event logic on this edge. [AI] More... | |
Mx3DPointFloat * | m_unk0x50 |
[AI] Transition direction/unit vector—used for edge trigger geometry. [AI] More... | |
![]() | |
LegoU8 | m_numEdges |
[AI] Number of edge elements in m_edges; number of sides of the polygon. [AI] More... | |
LegoUnknown100db7f4 ** | m_edges |
[AI] Array of pointers to edge objects (LegoUnknown100db7f4) comprising this face. [AI] More... | |
Friends | |
class | LegoPathController |
[AI] Declares LegoPathController as a friend, allowing it to access internal members for path placement and control. [AI] More... | |
[AI] Represents a "geometry edge" in the LEGO Island world polygon/path system.
Extends LegoWEEdge. It contains extra geometry information such as edge normals, flags, triggers, and other geometry metrics. [AI] The class is used in path/boundary computations, LOD edge logic, physics, and geometry-based triggering. [AI] SIZE: 0x54 [AI] VTABLE: LEGO1 0x100db7f8 [AI]
Definition at line 31 of file legowegedge.h.
anonymous enum |
[AI] Flags controlling various edge behaviors and states. [AI]
Enumerator | |
---|---|
c_bit1 | [AI] Edge-specific flag (purpose determined by logic in edge processing) |
c_bit2 | [AI] |
c_bit3 | [AI] |
c_bit5 | [AI] Disabled flag mask (see GetFlag0x10/SetFlag0x10) [AI] |
Definition at line 34 of file legowegedge.h.
LegoWEGEdge::LegoWEGEdge | ( | ) |
[AI] Constructs a LegoWEGEdge and initializes its member variables.
[AI]
[AI]
Definition at line 12 of file legowegedge.cpp.
|
override |
[AI] Destroys this edge instance and properly deallocates memory for associated dynamic members.
[AI]
[AI]
Definition at line 25 of file legowegedge.cpp.
|
protected |
[AI] Internal routine called by VTable0x04 for validity checking of polygon vertices and normal consistency.
Returns 0 for OK, negative for degenerate or nonplanar geometry. [AI]
Definition at line 221 of file legowegedge.cpp.
|
inline |
[AI] Returns a pointer to the 4D edge normal at the given sub-edge index.
Used for plane intersection/testing. [AI]
index | Index of the edge normal in the edge's polygonal set [AI] |
Definition at line 75 of file legowegedge.h.
|
inline |
Returns TRUE if the 'disabled' flag is not set, otherwise FALSE.
Used as a quick status/activation check for edge-flags. [AI]
Definition at line 57 of file legowegedge.h.
|
inline |
[AI] Returns a two-bit mask of the first two edge state flags (bit1, bit2).
Useful for quickly getting the basic state/type of this edge (e.g., path eligibility/state flags). [AI]
Definition at line 98 of file legowegedge.h.
|
inline |
[AI] Returns the name string of this edge, typically used for debugging and lookup.
[AI]
Definition at line 79 of file legowegedge.h.
|
inline |
[AI] Returns a pointer to the cached 4D normal or reference plane for the edge.
This vector is central for many operations like side detection, collision, and physics. [AI]
Definition at line 70 of file legowegedge.h.
|
inline |
[AI] Sets the enabled/disabled flag for this edge.
If p_disable is TRUE (nonzero), disables the edge (clears bit5). If FALSE, enables it (sets bit5). Used by path logic to dynamically disable/enable edges at runtime. [AI]
p_disable | Whether to disable (TRUE) or enable (FALSE) this edge. [AI] |
Definition at line 85 of file legowegedge.h.
|
overridevirtual |
[AI] Performs geometry calculations for the edge, sets up normals, center point, and trigger vectors.
Returns 0 for success, negative values for various errors. See implementation for details on error codes. [AI]
Reimplemented from LegoWEEdge.
Definition at line 47 of file legowegedge.cpp.
|
friend |
[AI] Declares LegoPathController as a friend, allowing it to access internal members for path placement and control. [AI]
Definition at line 101 of file legowegedge.h.
|
protected |
[AI] Per-edge normals for each polygon segment, allocated dynamically. [AI]
Definition at line 113 of file legowegedge.h.
|
protected |
[AI] Flags indicating edge state, enabled/disabled, and type bits. [AI]
Definition at line 109 of file legowegedge.h.
|
protected |
[AI] Edge's name string, dynamically allocated for debug/lookup. [AI]
Definition at line 111 of file legowegedge.h.
|
protected |
[AI] Number of trigger (path/segment) structures attached to this edge. [AI]
Definition at line 116 of file legowegedge.h.
|
protected |
[AI] Array of triggers influencing entity motion or event logic on this edge. [AI]
Definition at line 117 of file legowegedge.h.
|
protected |
[AI] Unknown, used for internal status/tracking. [AI]
Definition at line 110 of file legowegedge.h.
|
protected |
[AI] 4D plane equation or normal used for polygon/edge side tests. [AI]
Definition at line 112 of file legowegedge.h.
|
protected |
[AI] Cached center for the edge polygon, used in geometric calculations. [AI]
Definition at line 114 of file legowegedge.h.
|
protected |
[AI] Maximum squared distance from center—polygon bounding radius or similar. [AI]
Definition at line 115 of file legowegedge.h.
|
protected |
[AI] Transition direction/unit vector—used for edge trigger geometry. [AI]
Definition at line 118 of file legowegedge.h.