Isle
Loading...
Searching...
No Matches
LegoWEGEdge Class Reference

[AI] Represents a "geometry edge" in the LEGO Island world polygon/path system. More...

#include <legowegedge.h>

Inheritance diagram for LegoWEGEdge:
Collaboration diagram for LegoWEGEdge:

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...
 
Mx4DPointFloatGetUnknown0x14 ()
 [AI] Returns a pointer to the cached 4D normal or reference plane for the edge. More...
 
Mx4DPointFloatGetEdgeNormal (int index)
 [AI] Returns a pointer to the 4D edge normal at the given sub-edge index. More...
 
const LegoCharGetName ()
 [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...
 
- Public Member Functions inherited from LegoWEEdge
 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...
 
LegoCharm_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...
 
Mx4DPointFloatm_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...
 
PathWithTriggerm_pathTrigger
 [AI] Array of triggers influencing entity motion or event logic on this edge. [AI] More...
 
Mx3DPointFloatm_unk0x50
 [AI] Transition direction/unit vector—used for edge trigger geometry. [AI] More...
 
- Protected Attributes inherited from LegoWEEdge
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...
 

Detailed Description

[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.

Member Enumeration Documentation

◆ anonymous enum

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.

Constructor & Destructor Documentation

◆ LegoWEGEdge()

LegoWEGEdge::LegoWEGEdge ( )

[AI] Constructs a LegoWEGEdge and initializes its member variables.

[AI]

[AI]

Definition at line 12 of file legowegedge.cpp.

◆ ~LegoWEGEdge()

LegoWEGEdge::~LegoWEGEdge ( )
override

[AI] Destroys this edge instance and properly deallocates memory for associated dynamic members.

[AI]

[AI]

Definition at line 25 of file legowegedge.cpp.

Member Function Documentation

◆ FUN_1009aea0()

LegoS32 LegoWEGEdge::FUN_1009aea0 ( )
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]

Returns
Result code (0 OK, negative if error on geometry consistency) [AI]

Definition at line 221 of file legowegedge.cpp.

◆ GetEdgeNormal()

Mx4DPointFloat * LegoWEGEdge::GetEdgeNormal ( int  index)
inline

[AI] Returns a pointer to the 4D edge normal at the given sub-edge index.

Used for plane intersection/testing. [AI]

Parameters
indexIndex of the edge normal in the edge's polygonal set [AI]
Returns
Pointer to the normal at the requested index. [AI]

Definition at line 75 of file legowegedge.h.

◆ GetFlag0x10()

LegoU32 LegoWEGEdge::GetFlag0x10 ( )
inline

Returns TRUE if the 'disabled' flag is not set, otherwise FALSE.

Used as a quick status/activation check for edge-flags. [AI]

Returns
TRUE if enabled, FALSE if disabled (bit5 cleared). [AI]

Definition at line 57 of file legowegedge.h.

◆ GetMask0x03()

LegoU8 LegoWEGEdge::GetMask0x03 ( )
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]

Returns
Bitwise OR of c_bit1 and c_bit2 flags. [AI]

Definition at line 98 of file legowegedge.h.

◆ GetName()

const LegoChar * LegoWEGEdge::GetName ( )
inline

[AI] Returns the name string of this edge, typically used for debugging and lookup.

[AI]

Returns
Pointer to a null-terminated string holding the edge name. [AI]

Definition at line 79 of file legowegedge.h.

◆ GetUnknown0x14()

Mx4DPointFloat * LegoWEGEdge::GetUnknown0x14 ( )
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]

Returns
Pointer to m_unk0x14. [AI]

Definition at line 70 of file legowegedge.h.

◆ SetFlag0x10()

void LegoWEGEdge::SetFlag0x10 ( LegoU32  p_disable)
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]

Parameters
p_disableWhether to disable (TRUE) or enable (FALSE) this edge. [AI]

Definition at line 85 of file legowegedge.h.

◆ VTable0x04()

LegoS32 LegoWEGEdge::VTable0x04 ( )
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]

Returns
Result code (0 = OK, negatives = error). [AI]

Reimplemented from LegoWEEdge.

Definition at line 47 of file legowegedge.cpp.

Friends And Related Function Documentation

◆ LegoPathController

friend class LegoPathController
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.

Member Data Documentation

◆ m_edgeNormals

Mx4DPointFloat* LegoWEGEdge::m_edgeNormals
protected

[AI] Per-edge normals for each polygon segment, allocated dynamically. [AI]

Definition at line 113 of file legowegedge.h.

◆ m_flags

LegoU8 LegoWEGEdge::m_flags
protected

[AI] Flags indicating edge state, enabled/disabled, and type bits. [AI]

Definition at line 109 of file legowegedge.h.

◆ m_name

LegoChar* LegoWEGEdge::m_name
protected

[AI] Edge's name string, dynamically allocated for debug/lookup. [AI]

Definition at line 111 of file legowegedge.h.

◆ m_numTriggers

LegoU8 LegoWEGEdge::m_numTriggers
protected

[AI] Number of trigger (path/segment) structures attached to this edge. [AI]

Definition at line 116 of file legowegedge.h.

◆ m_pathTrigger

PathWithTrigger* LegoWEGEdge::m_pathTrigger
protected

[AI] Array of triggers influencing entity motion or event logic on this edge. [AI]

Definition at line 117 of file legowegedge.h.

◆ m_unk0x0d

LegoU8 LegoWEGEdge::m_unk0x0d
protected

[AI] Unknown, used for internal status/tracking. [AI]

Definition at line 110 of file legowegedge.h.

◆ m_unk0x14

Mx4DPointFloat LegoWEGEdge::m_unk0x14
protected

[AI] 4D plane equation or normal used for polygon/edge side tests. [AI]

Definition at line 112 of file legowegedge.h.

◆ m_unk0x30

Mx3DPointFloat LegoWEGEdge::m_unk0x30
protected

[AI] Cached center for the edge polygon, used in geometric calculations. [AI]

Definition at line 114 of file legowegedge.h.

◆ m_unk0x44

float LegoWEGEdge::m_unk0x44
protected

[AI] Maximum squared distance from center—polygon bounding radius or similar. [AI]

Definition at line 115 of file legowegedge.h.

◆ m_unk0x50

Mx3DPointFloat* LegoWEGEdge::m_unk0x50
protected

[AI] Transition direction/unit vector—used for edge trigger geometry. [AI]

Definition at line 118 of file legowegedge.h.


The documentation for this class was generated from the following files: