Isle
|
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles, NPCs). More...
#include <legopathboundary.h>
Public Member Functions | |
LegoPathBoundary () | |
[AI] Constructs a LegoPathBoundary, initializing internal actor/presenter storage. More... | |
~LegoPathBoundary () override | |
[AI] Destructor. More... | |
MxResult | AddActor (LegoPathActor *p_actor) |
[AI] Adds the given actor to this path boundary and sets its boundary pointer. More... | |
MxResult | RemoveActor (LegoPathActor *p_actor) |
[AI] Removes the actor from this boundary's actor set. More... | |
void | FUN_100575b0 (Vector3 &p_point1, Vector3 &p_point2, LegoPathActor *p_actor) |
[AI] Handles processing path triggers along this boundary as an actor moves from p_point1 to p_point2. More... | |
void | SwitchBoundary (LegoPathActor *p_actor, LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4) |
[AI] Switches the boundary that the actor is associated with based on edge traversal. More... | |
MxU32 | Intersect (float p_scale, Vector3 &p_point1, Vector3 &p_point2, Vector3 &p_point3, LegoUnknown100db7f4 *&p_edge) |
[AI] Tests for intersection between a path and this boundary; finds the first edge hit and intersection point. More... | |
MxU32 | FUN_10057fe0 (LegoAnimPresenter *p_presenter) |
[AI] Adds an animation presenter to the set if within region, based on spatial bounds. More... | |
MxU32 | FUN_100586e0 (LegoAnimPresenter *p_presenter) |
[AI] Removes an animation presenter from the set, or if nullptr resets all presenters' world association. More... | |
LegoPathActorSet & | GetActors () |
[AI] Direct access to the actor set for this boundary. More... | |
LegoAnimPresenterSet & | GetPresenters () |
[AI] Direct access to the animation presenter set for this boundary. More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
enum | { c_bit1 = 0x01 , c_bit2 = 0x02 , c_bit3 = 0x04 , c_bit5 = 0x10 } |
[AI] Flags controlling various edge behaviors and states. [AI] More... | |
![]() | |
LegoS32 | FUN_1009aea0 () |
[AI] Internal routine called by VTable0x04 for validity checking of polygon vertices and normal consistency. More... | |
![]() | |
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... | |
[AI] Represents a path segment or boundary in the navigation network for actors (vehicles, NPCs).
[AI] Inherits from LegoWEGEdge, connecting multiple path edges and managing the set of actors present on this path segment as well as relevant animation presenters. Provides API for actor entry, removal, intersection testing, and traversal between boundaries.
Definition at line 59 of file legopathboundary.h.
LegoPathBoundary::LegoPathBoundary | ( | ) |
[AI] Constructs a LegoPathBoundary, initializing internal actor/presenter storage.
Definition at line 13 of file legopathboundary.cpp.
|
override |
[AI] Destructor.
Cleans up actors and removes their boundary association.
Definition at line 19 of file legopathboundary.cpp.
MxResult LegoPathBoundary::AddActor | ( | LegoPathActor * | p_actor | ) |
[AI] Adds the given actor to this path boundary and sets its boundary pointer.
p_actor | Pointer to LegoPathActor to add. [AI] |
Definition at line 30 of file legopathboundary.cpp.
void LegoPathBoundary::FUN_100575b0 | ( | Vector3 & | p_point1, |
Vector3 & | p_point2, | ||
LegoPathActor * | p_actor | ||
) |
[AI] Handles processing path triggers along this boundary as an actor moves from p_point1 to p_point2.
[AI] Checks all triggers if the movement between points crosses their threshold, calling the appropriate trigger handler per trigger direction.
p_point1 | Starting position of movement. [AI] |
p_point2 | Ending position of movement. [AI] |
p_actor | Actor moving along the path. [AI] |
Definition at line 47 of file legopathboundary.cpp.
MxU32 LegoPathBoundary::FUN_10057fe0 | ( | LegoAnimPresenter * | p_presenter | ) |
[AI] Adds an animation presenter to the set if within region, based on spatial bounds.
[AI] Inserts specific subclass instances (e.g., LegoLocomotionAnimPresenter*). Used for assigning control to presenters within range.
p_presenter | Animation presenter instance. [AI] |
Definition at line 343 of file legopathboundary.cpp.
MxU32 LegoPathBoundary::FUN_100586e0 | ( | LegoAnimPresenter * | p_presenter | ) |
[AI] Removes an animation presenter from the set, or if nullptr resets all presenters' world association.
p_presenter | Animation presenter to remove, or NULL for batch removal. [AI] |
Definition at line 366 of file legopathboundary.cpp.
|
inline |
[AI] Direct access to the actor set for this boundary.
Definition at line 146 of file legopathboundary.h.
|
inline |
[AI] Direct access to the animation presenter set for this boundary.
Definition at line 152 of file legopathboundary.h.
MxU32 LegoPathBoundary::Intersect | ( | float | p_scale, |
Vector3 & | p_point1, | ||
Vector3 & | p_point2, | ||
Vector3 & | p_point3, | ||
LegoUnknown100db7f4 *& | p_edge | ||
) |
[AI] Tests for intersection between a path and this boundary; finds the first edge hit and intersection point.
[AI] Used for navigation/pathfinding. If the segment crosses an edge, calculates where it intersects and on which subedge.
p_scale | Scaling factor, typically unused in current impl. [AI] |
p_point1 | Segment start position. [AI] |
p_point2 | Segment end position. [AI] |
p_point3 | Output: the computed intersection point. [AI] |
p_edge | Output: pointer to the edge crossed/found. [AI] |
Definition at line 183 of file legopathboundary.cpp.
MxResult LegoPathBoundary::RemoveActor | ( | LegoPathActor * | p_actor | ) |
[AI] Removes the actor from this boundary's actor set.
p_actor | Pointer to actor to remove. [AI] |
Definition at line 39 of file legopathboundary.cpp.
void LegoPathBoundary::SwitchBoundary | ( | LegoPathActor * | p_actor, |
LegoPathBoundary *& | p_boundary, | ||
LegoUnknown100db7f4 *& | p_edge, | ||
float & | p_unk0xe4 | ||
) |
[AI] Switches the boundary that the actor is associated with based on edge traversal.
[AI] Handles neighbor boundary search and traversal logic with respect to actor navigation flags and edge properties.
p_actor | The actor potentially switching boundaries. [AI] |
p_boundary | Reference to the actor's current boundary, will be updated if switch occurs. [AI] |
p_edge | Reference to the edge across which the switch may occur; updates during process. [AI] |
p_unk0xe4 | Value representing fractional progress/tangent or orientation for traversal; may be adjusted. [AI] |
Definition at line 86 of file legopathboundary.cpp.