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

[AI] Represents a face (polygon) composed of a list of edges in the LEGO Island world engine. More...

#include <legoweedge.h>

Inheritance diagram for LegoWEEdge:
Collaboration diagram for LegoWEEdge:

Public Member Functions

 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 Attributes

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

Detailed Description

[AI] Represents a face (polygon) composed of a list of edges in the LEGO Island world engine.

[AI] This class manages an array of pointers to edge objects (LegoUnknown100db7f4), tracks their count, and handles establishing adjacency (linking edges to their neighbors and faces). Used as base for faces in world mesh structure.

[AI] Each LegoWEEdge instance corresponds to a face, and contains references to its constituent edges (m_edges), which are edge objects with information on face membership (A/B), adjacency, and points (vertices). The VTable0x04 method (with custom edge linkage logic) is important for setting up cyclic relations between edge objects and their corresponding faces, based on edge connectivity.

Definition at line 17 of file legoweedge.h.

Constructor & Destructor Documentation

◆ LegoWEEdge()

LegoWEEdge::LegoWEEdge ( )

[AI] Constructs a LegoWEEdge with no edges.

Members are set to represent an empty face.

Definition at line 8 of file legoweedge.cpp.

◆ ~LegoWEEdge()

LegoWEEdge::~LegoWEEdge ( )
virtual

[AI] Destroys the LegoWEEdge object, releasing memory used by its edge list.

[AI] Frees the m_edges array if it was allocated, but does not delete the actual edge objects (LegoUnknown100db7f4), which are managed elsewhere.

Definition at line 15 of file legoweedge.cpp.

Member Function Documentation

◆ GetEdges()

LegoUnknown100db7f4 ** LegoWEEdge::GetEdges ( )
inline

[AI] Gets the array of pointers to the edge objects that form this face.

Returns
Pointer to array of LegoUnknown100db7f4*.

Definition at line 49 of file legoweedge.h.

◆ GetNumEdges()

LegoU8 LegoWEEdge::GetNumEdges ( )
inline

[AI] Returns the number of edge elements assigned to this face.

Returns
The number of edges.

Definition at line 43 of file legoweedge.h.

◆ IsEqual()

LegoU32 LegoWEEdge::IsEqual ( LegoWEEdge p_other)
inline

[AI] Checks if this face object is the same as another.

Parameters
p_otherThe other LegoWEEdge to compare with. [AI]
Returns
Nonzero if the two pointers are identical; 0 otherwise.

Definition at line 56 of file legoweedge.h.

◆ SetEdges()

void LegoWEEdge::SetEdges ( LegoUnknown100db7f4 **  p_edges,
LegoU8  p_numEdges 
)
inline

[AI] Assigns the edge list and count for this face.

Parameters
p_edgesPointer to an array of LegoUnknown100db7f4* objects (edge pointers). [AI]
p_numEdgesNumber of edge pointers in the array. [AI]

[AI] Does not take ownership of the array memory (only pointer assignment); edge objects should persist for the face's lifetime.

Definition at line 64 of file legoweedge.h.

◆ VTable0x04()

LegoS32 LegoWEEdge::VTable0x04 ( )
virtual

[AI] Connects and links the associated edge objects to set up adjacency across the face.

[AI] Iterates over the edge pointers stored in m_edges, and, for each pair, examines point connectivity to assign face and neighbor links between the edge objects, ensuring proper winding and adjacency for the mesh structures. This is a core step in establishing geometric/topological consistency in the in-game world's mesh.

Returns
[AI] Always returns 0 after processing. [AI_SUGGESTED_NAME: LinkEdgesAndFaces]

Reimplemented in LegoWEGEdge.

Definition at line 23 of file legoweedge.cpp.

Member Data Documentation

◆ m_edges

LegoUnknown100db7f4** LegoWEEdge::m_edges
protected

[AI] Array of pointers to edge objects (LegoUnknown100db7f4) comprising this face. [AI]

Definition at line 75 of file legoweedge.h.

◆ m_numEdges

LegoU8 LegoWEEdge::m_numEdges
protected

[AI] Number of edge elements in m_edges; number of sides of the polygon. [AI]

Definition at line 74 of file legoweedge.h.


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