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

[AI] An actor that moves along a predefined path, supporting boundary transitions, navigation and collisions. More...

#include <legopathactor.h>

Inheritance diagram for LegoPathActor:
Collaboration diagram for LegoPathActor:

Public Types

enum  ActorState {
  c_initial = 0 , c_one = 1 , c_two = 2 , c_three = 3 ,
  c_disabled = 4 , c_maxState = 255 , c_noCollide = 0x100
}
 [AI] State and flags for a LegoPathActor during navigation along a path. [AI] More...
 
- Public Types inherited from LegoActor
enum  {
  c_none = 0 , c_pepper , c_mama , c_papa ,
  c_nick , c_laura , c_brickster
}
 [AI] Enumeration of actor IDs for known characters. More...
 
- Public Types inherited from LegoEntity
enum  Type {
  e_actor = 0 , e_unk1 , e_plant , e_building ,
  e_autoROI
}
 [AI] Types of LegoEntity (Actor, Plant, Building, Auto ROI, etc.) [AI] More...
 
enum  { c_bit1 = 0x01 , c_managerOwned = 0x02 }
 [AI] Bit flag constants for entity state management [AI] More...
 
enum  { c_altBit1 = 0x01 }
 [AI] Secondary bit flag constants [AI] More...
 

Public Member Functions

 LegoPathActor ()
 [AI] Initializes the path actor, setting up default state and references. [AI] More...
 
 ~LegoPathActor () override
 [AI] Destructor, cleans up allocated containers. [AI] More...
 
void ParseAction (char *p_extra) override
 [AI] Parses a set of key-value action commands and configures path navigation and collision for this actor. More...
 
virtual MxS32 VTable0x68 (Vector3 &p_v1, Vector3 &p_v2, Vector3 &p_v3)
 [AI] Checks for collision/intersection with boundaries, geometry, and other actors along a traced segment; assists in advanced pathfinding by propagation. More...
 
virtual MxU32 VTable0x6c (LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3)
 [AI] Trace movement or collision through presenters (edge test), then through other actors. More...
 
virtual void Animate (float p_time)
 [AI] Per-frame animation update. More...
 
virtual void VTable0x74 (Matrix4 &p_transform)
 [AI] Updates the ROI's transformation (typically matrix) with new values, applies world position/orientation changes. More...
 
virtual void SetUserNavFlag (MxBool p_userNavFlag)
 [AI] Sets whether the actor is controlled by user navigation. More...
 
virtual MxBool GetUserNavFlag ()
 [AI] Returns user navigation state (whether actor follows player input). More...
 
virtual MxResult VTable0x80 (const Vector3 &p_point1, Vector3 &p_point2, Vector3 &p_point3, Vector3 &p_point4)
 [AI] Calculates path interpolation for a set of points, updates state for path animation, and computes Bezier arc duration. More...
 
virtual MxResult VTable0x84 (LegoPathBoundary *p_boundary, float p_time, Vector3 &p_p1, Vector3 &p_p4, LegoUnknown100db7f4 &p_destEdge, float p_destScale)
 [AI] Moves actor to a destination edge. More...
 
virtual MxResult VTable0x88 (LegoPathBoundary *p_boundary, float p_time, LegoEdge &p_srcEdge, float p_srcScale, LegoUnknown100db7f4 &p_destEdge, float p_destScale)
 [AI] Moves the actor between two edges across a boundary, recalculates placement and orientation. More...
 
virtual MxS32 VTable0x8c (float p_time, Matrix4 &p_transform)
 [AI] Advance actor's position/state along the path for a given timeslice. More...
 
virtual MxU32 VTable0x90 (float, Matrix4 &)
 [AI] Placeholder for custom logic during per-timestep simulation for non-user-controlled animation. More...
 
virtual MxResult HitActor (LegoPathActor *, MxBool)
 [AI] Handles logic when this actor hits (collides with) another path actor; can be overridden for custom interaction. More...
 
virtual void SwitchBoundary (LegoPathBoundary *&p_boundary, LegoUnknown100db7f4 *&p_edge, float &p_unk0xe4)
 [AI] Switches current path boundary and destination edge, typically called on transitions or respawns. More...
 
virtual MxResult VTable0x9c ()
 [AI] Handles exit transition and next-edge search logic; also used for collision reaction and fallback. More...
 
virtual MxS32 VTable0xa0 ()
 [AI] Placeholder for custom extension. More...
 
virtual void VTable0xa4 (MxBool &p_und1, MxS32 &p_und2)
 [AI] Returns information depending on actor type. More...
 
virtual void VTable0xa8 ()
 [AI] Re-applies transform to ROI, updates camera if needed, and processes per-actor tick actions. More...
 
virtual void SetMaxLinearVel (MxFloat p_maxLinearVel)
 [AI] Sets the maximum linear velocity for actor navigation. More...
 
virtual MxFloat GetMaxLinearVel ()
 [AI] Gets the maximum allowed navigation speed for this actor. More...
 
virtual MxFloat VTable0xb4 ()
 [AI] Returns an internal value used in fallback collision/velocity calculation (proportional fudge factor). More...
 
virtual MxFloat VTable0xb8 ()
 [AI] Returns a damping/multiplier factor used for velocity reduction after collisions. More...
 
virtual void VTable0xbc (MxFloat p_unk0x140)
 [AI] Sets the fudge parameter for fallback collision push-back. More...
 
virtual void VTable0xc0 (MxFloat p_unk0x144)
 [AI] Sets the velocity damping factor after bump. More...
 
virtual void VTable0xc4 ()
 [AI] Empty handler for optional custom per-tick transition logic. More...
 
virtual void VTable0xc8 (MxU8 p_unk0x148)
 [AI] Sets the rolling state (animation index, mainly for camera turning/curves). More...
 
const char * ClassName () const override
 [AI] Returns the class name string for RTTI-style checks. More...
 
MxBool IsA (const char *p_name) const override
 [AI] RTTI-like check, matches against own or base class name for IsA hierarchy checks. More...
 
LegoPathBoundaryGetBoundary ()
 [AI] Retrieves the current path boundary associated with this actor. More...
 
MxU32 GetActorState ()
 [AI] Gets the current navigation/animation state of the actor. More...
 
LegoPathControllerGetController ()
 [AI] Retrieves pointer to the path controller which governs this actor's movement. More...
 
MxBool GetCollideBox ()
 [AI] Gets the actor's collision box flag (if TRUE, actor uses a precise collision shape). More...
 
MxFloat GetLastTime ()
 [AI] Gets the previous animation time value from last simulation tick. More...
 
MxFloat GetActorTime ()
 [AI] Returns the current animation time of the actor. More...
 
void SetBoundary (LegoPathBoundary *p_boundary)
 [AI] Assigns a new boundary for the actor (for path switching). More...
 
void SetActorState (MxU32 p_actorState)
 [AI] Sets the navigation/path state of the actor. More...
 
void SetController (LegoPathController *p_pathController)
 [AI] Assigns a new path controller (used for actor transitions between paths). More...
 
void SetLastTime (MxFloat p_lastTime)
 [AI] Sets the time value for the last performed simulation tick. More...
 
void SetActorTime (MxFloat p_actorTime)
 [AI] Sets the global actor animation time value, adjusting how far along the animation is. More...
 
void UpdatePlane (LegoNamedPlane &p_namedPlane)
 [AI] Updates a named plane to match this actor's world position, direction, and up vector. More...
 
void PlaceActor (LegoNamedPlane &p_namedPlane)
 [AI] Places this actor into the world at the given plane's name, location, and orientation. More...
 
- Public Member Functions inherited from LegoActor
 LegoActor ()
 [AI] Constructs new LegoActor, initializes members. More...
 
 ~LegoActor () override
 [AI] Cleans up LegoActor; stops sound if active. More...
 
const char * ClassName () const override
 [AI] Gets the class name of this object. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Determines if the class is or derives from the given name. More...
 
void ParseAction (char *p_extra) override
 [AI] Parses an action string and applies parsed behaviors to the actor. More...
 
void SetROI (LegoROI *p_roi, MxBool p_bool1, MxBool p_bool2) override
 [AI] Sets the Region of Interest (ROI, i.e. More...
 
virtual MxFloat GetSoundFrequencyFactor ()
 [AI] Returns the current frequency factor for the actor's sound. More...
 
virtual void SetSoundFrequencyFactor (MxFloat p_frequencyFactor)
 [AI] Sets the frequency factor for the actor's sound playback (e.g., to alter pitch). More...
 
virtual void VTable0x58 (MxFloat p_unk0x70)
 [AI] Sets a floating point property, unknown usage (possibly animation or audio parameter). More...
 
virtual MxFloat VTable0x5c ()
 [AI] Gets the unknown floating point property set by VTable0x58. [AI] [AI_SUGGESTED_NAME: GetVoicePitchModifier] More...
 
virtual MxU8 GetActorId ()
 [AI] Gets this actor's numeric ID, corresponding to a known enumeration/actor. More...
 
virtual void SetActorId (MxU8 p_actorId)
 [AI] Sets the actor's numeric ID. More...
 
void Mute (MxBool p_muted)
 [AI] Mutes or unmutes the actor's current sound. More...
 
- Public Member Functions inherited from LegoEntity
 LegoEntity ()
 [AI] Default constructor. Initializes the LegoEntity with default values. [AI] More...
 
 ~LegoEntity () override
 [AI] Destructor. Cleans up resources and ensures ROI and script state are released. [AI] More...
 
MxLong Notify (MxParam &p_param) override
 [AI] Handles event notification for the entity, most notably user clicks, using polymorphic dispatch. More...
 
const char * ClassName () const override
 [AI] Returns the class name string. Used in entity runtime type identification. [AI] More...
 
MxBool IsA (const char *p_name) const override
 [AI] Polymorphic type check for this entity given a string. More...
 
virtual MxResult Create (MxDSAction &p_dsAction)
 [AI] Initializes the entity from a DSAction object, typically from a script or file load. More...
 
virtual void Destroy (MxBool p_fromDestructor)
 [AI] Cleans up the entity, detaching ROI and releasing references. More...
 
virtual void ParseAction (char *p_extra)
 [AI] Parses an action description string (usually from script "extra" data) and sets up this entity's action state. More...
 
virtual void SetROI (LegoROI *p_roi, MxBool p_bool1, MxBool p_bool2)
 [AI] Assigns a 3D ROI (3D object instance) to this entity, controlling how it appears/acts in the world. More...
 
virtual void SetWorldTransform (const Vector3 &p_location, const Vector3 &p_direction, const Vector3 &p_up)
 [AI] Explicitly sets the world transformation (location, direction, up vector) for this entity. More...
 
virtual void ResetWorldTransform (MxBool p_cameraFlag)
 [AI] Resets the transformation for this entity (e.g., used with camera transitions). More...
 
virtual void SetWorldSpeed (MxFloat p_worldSpeed)
 [AI] Sets the current world speed value for this entity (used to control motion/animation rate). More...
 
virtual void ClickSound (MxBool p_und)
 [AI] Plays a click sound, typically in response to user/AI actions, according to entity type. More...
 
virtual void ClickAnimation ()
 [AI] Plays a context-sensitive click animation, driven by current entity type and state. [AI] More...
 
virtual void SwitchVariant ()
 [AI] Switches variants for this entity (e.g., different animation, mesh, or texture variant), based on type. [AI] More...
 
virtual void SwitchSound ()
 [AI] Triggers a context-dependent audio/sound variant switch for this entity. [AI] More...
 
virtual void SwitchMove ()
 [AI] Switches movement/animation variant for this entity, if applicable (e.g., walking/running state). [AI] More...
 
virtual void SwitchColor (LegoROI *p_roi)
 [AI] Switches the color or texture variant for this entity (or target ROI). More...
 
virtual void SwitchMood ()
 [AI] Triggers a mood/state switch for this entity (if supported), often for characters. [AI] More...
 
void FUN_10010c30 ()
 [AI] Updates the camera transformation when this entity is the camera target. Used after movement or position updates. [AI] More...
 
void SetType (MxU8 p_type)
 [AI] Sets the entity's type (actor/plant/building/etc.) [AI] More...
 
void SetLocation (const Vector3 &p_location, const Vector3 &p_direction, const Vector3 &p_up, MxBool p_und)
 [AI] Sets the world-space location, direction, and up, applying normalization and transformation. More...
 
Mx3DPointFloat GetWorldDirection ()
 [AI] Gets the normalized world-space direction vector, optionally updating from ROI. [AI] More...
 
Mx3DPointFloat GetWorldUp ()
 [AI] Gets the normalized world-space up vector, optionally updating from ROI. [AI] More...
 
Mx3DPointFloat GetWorldPosition ()
 [AI] Gets the world-space position vector, optionally updating from ROI. [AI] More...
 
MxBool GetUnknown0x10IsSet (MxU8 p_flag)
 [AI] Checks if a bit flag in m_unk0x10 is set (purpose: state/animation suppression lock). More...
 
MxBool GetFlagsIsSet (MxU8 p_flag)
 [AI] Checks if a flag is set in the primary flags byte (m_flags). More...
 
MxU8 GetFlags ()
 [AI] Returns the value of the flag byte. [AI] More...
 
MxFloat GetWorldSpeed ()
 [AI] Gets the entity's current world speed state. [AI] More...
 
LegoROIGetROI ()
 [AI] Gets the ROI (Realtime Object Instance) associated with this entity. [AI] More...
 
MxU8 GetType ()
 [AI] Gets the type of this entity (one of the enum Type values). [AI] More...
 
MxBool GetCameraFlag ()
 [AI] Returns whether this entity is flagged as camera (affects world/camera synchronization). [AI] More...
 
void SetFlags (MxU8 p_flags)
 [AI] Sets all entity flags at once (replaces previous). More...
 
void SetFlag (MxU8 p_flag)
 [AI] Sets the given flag in the flags byte. More...
 
void ClearFlag (MxU8 p_flag)
 [AI] Clears the given flag in the flags byte. More...
 
void SetUnknown0x10Flag (MxU8 p_flag)
 [AI] Sets the given bit in the unknown (usually internal action suppression) flag byte. More...
 
void ClearUnknown0x10Flag (MxU8 p_flag)
 [AI] Clears the given bit in the unknown flag byte. More...
 
- Public Member Functions inherited from MxEntity
 MxEntity ()
 Default constructor. More...
 
 ~MxEntity () override
 Virtual destructor for MxEntity. More...
 
const char * ClassName () const override
 Returns the class name for type introspection. More...
 
MxBool IsA (const char *p_name) const override
 Checks if the object is of the given class name or a parent type. More...
 
virtual MxResult Create (MxS32 p_entityId, const MxAtomId &p_atomId)
 Initializes the entity from a given entity ID and AtomId. More...
 
MxResult Create (MxDSAction &p_dsAction)
 Initializes the entity from a MxDSAction object. More...
 
MxS32 GetEntityId ()
 Returns the current entity ID. More...
 
MxAtomIdGetAtomId ()
 Returns a reference to the entity AtomId. More...
 
void SetEntityId (MxS32 p_entityId)
 Sets the entity ID to the given value. More...
 
void SetAtomId (const MxAtomId &p_atomId)
 Sets the AtomId to the given value. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Protected Member Functions

MxU32 FUN_1002edd0 (list< LegoPathBoundary * > &p_boundaries, LegoPathBoundary *p_boundary, Vector3 &p_v1, Vector3 &p_v2, float p_f1, float p_f2, Vector3 &p_v3, MxS32 p_und)
 [AI] Recursively checks boundaries for collisions or collision path propagation up to a certain recursion depth. More...
 
- Protected Member Functions inherited from LegoEntity
void Init ()
 [AI] Initializes the entity's members to default/neutral values (utility for constructors and resets). [AI] More...
 
void SetWorld ()
 [AI] Registers/attaches this entity to the current world if not already; called on create or location change. [AI] More...
 

Protected Attributes

MxFloat m_BADuration
 [AI] Duration of current Bezier arc (distance along path/current edge). [AI] More...
 
MxFloat m_unk0x7c
 [AI] Interpolator/progress state along curve segment. [AI] More...
 
MxFloat m_actorTime
 [AI] Animation time for current path segment. [AI] More...
 
MxFloat m_lastTime
 [AI] Time of last update (used for delta calculations). [AI] More...
 
LegoPathBoundarym_boundary
 [AI] Current boundary the actor is navigating on. [AI] More...
 
LegoUnknown m_unk0x8c
 [AI] Helper object for path curve interpolation and evaluation. [AI] More...
 
MxU32 m_actorState
 [AI] State and flags bitfield for path following logic. [AI] More...
 
LegoUnknown100db7f4m_destEdge
 [AI] Current or target edge for path traversal. [AI] More...
 
MxFloat m_unk0xe4
 [AI] Position scalar on destination edge (0-1 across the edge). [AI] More...
 
MxBool m_collideBox
 [AI] Use bounding-box for more accurate collision. [AI] More...
 
MxBool m_unk0xe9
 [AI] Stores latest intersection/collision status/type. [AI] More...
 
MxBool m_userNavFlag
 [AI] TRUE if this actor is currently user/player controlled. [AI] More...
 
MxMatrix m_unk0xec
 [AI] World-to-local transformation matrix for this actor/ROI. [AI] More...
 
LegoPathEdgeContainerm_grec
 [AI] Edge/boundary helper for tracking transitions and stateful animation. [AI] More...
 
LegoPathControllerm_pathController
 [AI] Path controller/manages permitted boundaries for transitions. [AI] More...
 
MxFloat m_maxLinearVel
 [AI] Maximum speed of actor while moving along path. [AI] More...
 
MxFloat m_unk0x140
 [AI] Scaling factor for fallback/collision response logic. [AI] More...
 
MxFloat m_unk0x144
 [AI] Damping factor for velocity after collision ("bounce" friction). [AI] More...
 
MxU8 m_unk0x148
 [AI] Angle/animation mode for rolling/camera tilting. [AI] More...
 
MxS32 m_unk0x14c
 [AI] Rolling angle delta (variant for camera logic). [AI] More...
 
MxFloat m_unk0x150
 [AI] Scalar factor for camera turn velocity logic. [AI] More...
 
- Protected Attributes inherited from LegoActor
MxFloat m_frequencyFactor
 [AI] The frequency/pitch scaling factor for the actor's sound (default 0 == normal). More...
 
LegoCacheSoundm_sound
 [AI] Pointer to a currently active sound instance played by the actor, if any. More...
 
MxFloat m_unk0x70
 [AI] Unknown float property, likely used for advanced audio/animation control. [AI_SUGGESTED_NAME: m_voicePitchModifier] More...
 
MxU8 m_actorId
 [AI] Unique identifier for this actor, corresponding to enum above. More...
 
- Protected Attributes inherited from LegoEntity
MxU8 m_unk0x10
 [AI] Unknown state/flag, used mainly to guard against repeated actions or manage animation/sound state. [AI] More...
 
MxU8 m_flags
 [AI] Primary entity flags (bitfield); tracks per-entity management status, internal update locks, etc. [AI] More...
 
Mx3DPointFloat m_worldLocation
 [AI] Entity location in world coordinates. [AI] More...
 
Mx3DPointFloat m_worldDirection
 [AI] Entity direction vector in world space (normalized). [AI] More...
 
Mx3DPointFloat m_worldUp
 [AI] Entity up vector in world space (normalized). [AI] More...
 
MxFloat m_worldSpeed
 [AI] World-relative speed (can affect animation/movement logic). [AI] More...
 
LegoROIm_roi
 [AI] Pointer to this entity's currently assigned ROI (3D instance in the world). [AI] More...
 
MxBool m_cameraFlag
 [AI] Set to TRUE if this entity is currently the camera target. [AI] More...
 
MxU8 m_type
 [AI] The entity type (Type enum value). [AI] More...
 
Extra::ActionType m_actionType
 [AI] Action type, parsed from script/extra string (e.g., openram/run/exit); guides Notify() and click logic. [AI] More...
 
char * m_siFile
 [AI] When parsing ACTION command, this is the SI script/filename to execute (owned, heap-allocated). [AI] More...
 
MxS32 m_targetEntityId
 [AI] When parsing ACTION command, this is the target entity ID for the action (or -1 for none). [AI] More...
 
- Protected Attributes inherited from MxEntity
MxS32 m_entityId
 The unique entity ID, typically used for lookup and reference. More...
 
MxAtomId m_atomId
 The AtomId associated with this entity, used for resource and script identification. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from LegoActor
static const char * GetActorName (MxU8 p_id)
 [AI] Gets the static display name of an actor by ID. More...
 

Detailed Description

[AI] An actor that moves along a predefined path, supporting boundary transitions, navigation and collisions.

This class represents an actor that follows a path within the world, controlled either by the user or by AI. It manages interaction with path boundaries, position interpolation and collision with geometry or other path actors. It integrates with navigation controllers, keeps track of animation states and interpolates transforms, enabling smooth transitions, orientation, and switching between boundaries when needed.

[AI] Key responsibilities include:

  • Transitioning between path boundaries/edges based on movement and collision.
  • Allowing user-controlled or AI-controlled navigation (m_userNavFlag).
  • Interpolating position and orientation along path segments.
  • Handling actor-specific state/flags, such as disabling collision, handling collision boxes, and wall hit sound timing.
  • Serving as a bridge between path-following actors and the underlying world presentation.

Definition at line 32 of file legopathactor.h.

Member Enumeration Documentation

◆ ActorState

[AI] State and flags for a LegoPathActor during navigation along a path. [AI]

Enumerator
c_initial 

[AI] Default state upon creation or reset. [AI]

c_one 
c_two 
c_three 
c_disabled 

[AI] Marks as disabled or inactive for path follow logic. [AI]

c_maxState 

[AI] Max actor state (reserved for logic). [AI]

c_noCollide 

[AI] Disables collision for this actor (e.g. ghosts, debug). [AI]

Definition at line 35 of file legopathactor.h.

Constructor & Destructor Documentation

◆ LegoPathActor()

LegoPathActor::LegoPathActor ( )

[AI] Initializes the path actor, setting up default state and references. [AI]

Definition at line 43 of file legopathactor.cpp.

◆ ~LegoPathActor()

LegoPathActor::~LegoPathActor ( )
override

[AI] Destructor, cleans up allocated containers. [AI]

Definition at line 63 of file legopathactor.cpp.

Member Function Documentation

◆ Animate()

void LegoPathActor::Animate ( float  p_time)
virtual

[AI] Per-frame animation update.

Applies movement, linear velocity, adjusts transforms, and updates navigation/camera state. [AI]

Parameters
p_timeCurrent animation time. [AI]

Reimplemented in Act2Actor, Act3Shark, Act3Cop, Act3Brickster, Act3Ammo, Ambulance, Doors, DuneBuggy, Helicopter, Jetski, LegoAnimActor, LegoExtraActor, LegoJetski, LegoRaceCar, LegoCarRaceActor, LegoJetskiRaceActor, Motocycle, TowTrack, and LegoRaceMap.

Definition at line 400 of file legopathactor.cpp.

◆ ClassName()

const char * LegoPathActor::ClassName ( ) const
inlineoverridevirtual

[AI] Returns the class name string for RTTI-style checks.

[AI]

Reimplemented from LegoActor.

Reimplemented in LegoRaceActor, LegoJetski, LegoRaceCar, LegoCarRaceActor, LegoJetskiRaceActor, Motocycle, RaceCar, SkateBoard, and TowTrack.

Definition at line 270 of file legopathactor.h.

◆ FUN_1002edd0()

MxU32 LegoPathActor::FUN_1002edd0 ( list< LegoPathBoundary * > &  p_boundaries,
LegoPathBoundary p_boundary,
Vector3 p_v1,
Vector3 p_v2,
float  p_f1,
float  p_f2,
Vector3 p_v3,
MxS32  p_und 
)
inlineprotected

[AI] Recursively checks boundaries for collisions or collision path propagation up to a certain recursion depth.

[AI]

Parameters
p_boundariesList of boundaries already visited. [AI]
p_boundaryCurrent boundary to check. [AI]
p_v1World-space segment start. [AI]
p_v2World-space direction/normalized vector. [AI]
p_f1Segment length. [AI]
p_f2Segment radius (collision threshold). [AI]
p_v3Output: Hit position (if found). [AI]
p_undRecursion depth; stops after 2. [AI]
Returns
>0 on collision, 0 if none, propagates result. [AI]

Definition at line 494 of file legopathactor.cpp.

◆ GetActorState()

MxU32 LegoPathActor::GetActorState ( )
inline

[AI] Gets the current navigation/animation state of the actor.

[AI]

Definition at line 294 of file legopathactor.h.

◆ GetActorTime()

MxFloat LegoPathActor::GetActorTime ( )
inline

[AI] Returns the current animation time of the actor.

[AI]

Definition at line 314 of file legopathactor.h.

◆ GetBoundary()

LegoPathBoundary * LegoPathActor::GetBoundary ( )
inline

[AI] Retrieves the current path boundary associated with this actor.

[AI]

Returns
Pointer to the actor's current boundary. [AI]

Definition at line 289 of file legopathactor.h.

◆ GetCollideBox()

MxBool LegoPathActor::GetCollideBox ( )
inline

[AI] Gets the actor's collision box flag (if TRUE, actor uses a precise collision shape).

[AI]

Definition at line 304 of file legopathactor.h.

◆ GetController()

LegoPathController * LegoPathActor::GetController ( )
inline

[AI] Retrieves pointer to the path controller which governs this actor's movement.

[AI]

Definition at line 299 of file legopathactor.h.

◆ GetLastTime()

MxFloat LegoPathActor::GetLastTime ( )
inline

[AI] Gets the previous animation time value from last simulation tick.

[AI]

Definition at line 309 of file legopathactor.h.

◆ GetMaxLinearVel()

virtual MxFloat LegoPathActor::GetMaxLinearVel ( )
inlinevirtual

[AI] Gets the maximum allowed navigation speed for this actor.

[AI]

Returns
Max linear velocity (navigation speed). [AI]

Definition at line 231 of file legopathactor.h.

◆ GetUserNavFlag()

virtual MxBool LegoPathActor::GetUserNavFlag ( )
inlinevirtual

[AI] Returns user navigation state (whether actor follows player input).

[AI]

Returns
TRUE if actor is user controlled. [AI]

Definition at line 108 of file legopathactor.h.

◆ HitActor()

virtual MxResult LegoPathActor::HitActor ( LegoPathActor ,
MxBool   
)
inlinevirtual

[AI] Handles logic when this actor hits (collides with) another path actor; can be overridden for custom interaction.

[AI]

Parameters
-[AI]
Returns
Always 0 (no-op base class). [AI]

Reimplemented in Act2Actor, Act3Cop, Act3Actor, Act3Brickster, Doors, LegoExtraActor, LegoRaceActor, LegoJetski, LegoRaceCar, and Act2Brick.

Definition at line 183 of file legopathactor.h.

◆ IsA()

MxBool LegoPathActor::IsA ( const char *  p_name) const
inlineoverridevirtual

[AI] RTTI-like check, matches against own or base class name for IsA hierarchy checks.

[AI]

Parameters
p_nameClass name to compare. [AI]
Returns
TRUE if matches type. [AI]

Reimplemented from LegoActor.

Reimplemented in LegoRaceActor, LegoJetski, LegoRaceCar, LegoCarRaceActor, LegoJetskiRaceActor, Motocycle, RaceCar, SkateBoard, and TowTrack.

Definition at line 280 of file legopathactor.h.

◆ ParseAction()

void LegoPathActor::ParseAction ( char *  p_extra)
overridevirtual

[AI] Parses a set of key-value action commands and configures path navigation and collision for this actor.

[AI] Recognizes commands including "PERMIT_NAVIGATE", "PATH", "COLLIDEBOX", and issues configuration changes, triggers navigation, or boundary placement, etc.

Parameters
p_extraKey-value string with action commands. [AI]

Reimplemented from LegoActor.

Reimplemented in LegoRaceMap, LegoJetski, LegoRaceCar, and RaceSkel.

Definition at line 570 of file legopathactor.cpp.

◆ PlaceActor()

void LegoPathActor::PlaceActor ( LegoNamedPlane p_namedPlane)

[AI] Places this actor into the world at the given plane's name, location, and orientation.

[AI]

Parameters
p_namedPlaneInfo describing location/orientation and which boundary. [AI]

Definition at line 753 of file legopathactor.cpp.

◆ SetActorState()

void LegoPathActor::SetActorState ( MxU32  p_actorState)
inline

[AI] Sets the navigation/path state of the actor.

[AI]

Parameters
p_actorStateActor state constant. [AI]

Definition at line 326 of file legopathactor.h.

◆ SetActorTime()

void LegoPathActor::SetActorTime ( MxFloat  p_actorTime)
inline

[AI] Sets the global actor animation time value, adjusting how far along the animation is.

[AI]

Parameters
p_actorTimeNew time to set. [AI]

Definition at line 344 of file legopathactor.h.

◆ SetBoundary()

void LegoPathActor::SetBoundary ( LegoPathBoundary p_boundary)
inline

[AI] Assigns a new boundary for the actor (for path switching).

[AI]

Parameters
p_boundaryNew boundary to set. [AI]

Definition at line 320 of file legopathactor.h.

◆ SetController()

void LegoPathActor::SetController ( LegoPathController p_pathController)
inline

[AI] Assigns a new path controller (used for actor transitions between paths).

[AI]

Parameters
p_pathControllerNew path controller to use. [AI]

Definition at line 332 of file legopathactor.h.

◆ SetLastTime()

void LegoPathActor::SetLastTime ( MxFloat  p_lastTime)
inline

[AI] Sets the time value for the last performed simulation tick.

[AI]

Parameters
p_lastTimeLast time value to set. [AI]

Definition at line 338 of file legopathactor.h.

◆ SetMaxLinearVel()

virtual void LegoPathActor::SetMaxLinearVel ( MxFloat  p_maxLinearVel)
inlinevirtual

[AI] Sets the maximum linear velocity for actor navigation.

[AI]

Parameters
p_maxLinearVelMaximum allowed navigation speed. [AI]

Definition at line 225 of file legopathactor.h.

◆ SetUserNavFlag()

virtual void LegoPathActor::SetUserNavFlag ( MxBool  p_userNavFlag)
inlinevirtual

[AI] Sets whether the actor is controlled by user navigation.

[AI]

Parameters
p_userNavFlagTRUE if user navigation is enabled. [AI]

Definition at line 102 of file legopathactor.h.

◆ SwitchBoundary()

void LegoPathActor::SwitchBoundary ( LegoPathBoundary *&  p_boundary,
LegoUnknown100db7f4 *&  p_edge,
float &  p_unk0xe4 
)
virtual

[AI] Switches current path boundary and destination edge, typically called on transitions or respawns.

[AI]

Parameters
p_boundaryReference: will be updated to next boundary. [AI]
p_edgeReference: updated to next destination edge. [AI]
p_unk0xe4Reference: updated position scalar. [AI]

Reimplemented in Act3Brickster, LegoJetski, LegoRaceCar, and LegoCarRaceActor.

Definition at line 445 of file legopathactor.cpp.

◆ UpdatePlane()

void LegoPathActor::UpdatePlane ( LegoNamedPlane p_namedPlane)

[AI] Updates a named plane to match this actor's world position, direction, and up vector.

[AI]

Parameters
p_namedPlaneNamed plane object to update. [AI]

Definition at line 744 of file legopathactor.cpp.

◆ VTable0x68()

MxS32 LegoPathActor::VTable0x68 ( Vector3 p_v1,
Vector3 p_v2,
Vector3 p_v3 
)
virtual

[AI] Checks for collision/intersection with boundaries, geometry, and other actors along a traced segment; assists in advanced pathfinding by propagation.

Parameters
p_v1Start position in world space. [AI]
p_v2End position in world space. [AI]
p_v3Output: Collision/contact point if found. [AI]
Returns
>0 if collision occurred, 0 otherwise, <0 on error. [AI]

Reimplemented in LegoExtraActor, Act2Actor, and LegoRaceActor.

Definition at line 546 of file legopathactor.cpp.

◆ VTable0x6c()

MxU32 LegoPathActor::VTable0x6c ( LegoPathBoundary p_boundary,
Vector3 p_v1,
Vector3 p_v2,
float  p_f1,
float  p_f2,
Vector3 p_v3 
)
virtual

[AI] Trace movement or collision through presenters (edge test), then through other actors.

Designed for advanced collision testing and animation triggers. [AI]

Parameters
p_boundaryBoundary to check within. [AI]
p_v1Segment start. [AI]
p_v2Segment end. [AI]
p_f1Scalar for test segment length. [AI]
p_f2Scalar for radius or additional space. [AI]
p_v3Output: Resulting intersection position, if any. [AI]
Returns
1 if presenter handled event, 2 if actor collision, 0 if no collision/event. [AI]

Reimplemented in LegoExtraActor, LegoJetski, LegoRaceCar, LegoCarRaceActor, and LegoJetskiRaceActor.

Definition at line 453 of file legopathactor.cpp.

◆ VTable0x74()

void LegoPathActor::VTable0x74 ( Matrix4 p_transform)
virtual

[AI] Updates the ROI's transformation (typically matrix) with new values, applies world position/orientation changes.

[AI]

Parameters
p_transformTransformation matrix to apply. [AI]

Reimplemented in Helicopter, LegoAnimActor, and LegoExtraActor.

Definition at line 382 of file legopathactor.cpp.

◆ VTable0x80()

MxResult LegoPathActor::VTable0x80 ( const Vector3 p_point1,
Vector3 p_point2,
Vector3 p_point3,
Vector3 p_point4 
)
virtual

[AI] Calculates path interpolation for a set of points, updates state for path animation, and computes Bezier arc duration.

[AI]

Parameters
p_point1Segment or control point 1. [AI]
p_point2Segment or control point 2. [AI]
p_point3Segment or control point 3. [AI]
p_point4Segment or control point 4. [AI]
Returns
SUCCESS on update, FAILURE if arc length is degenerate. [AI]

Definition at line 71 of file legopathactor.cpp.

◆ VTable0x84()

MxResult LegoPathActor::VTable0x84 ( LegoPathBoundary p_boundary,
float  p_time,
Vector3 p_p1,
Vector3 p_p4,
LegoUnknown100db7f4 p_destEdge,
float  p_destScale 
)
virtual

[AI] Moves actor to a destination edge.

Handles placement, orientation update, assignment of new boundary and edge, updates transformation matrix. [AI]

Parameters
p_boundaryDestination boundary. [AI]
p_timeCurrent/target time. [AI]
p_p1Start position. [AI]
p_p4Target direction/offset. [AI]
p_destEdgeDestination edge on boundary. [AI]
p_destScaleLocation scale on destination edge (relative position). [AI]
Returns
SUCCESS if placed, FAILURE if path/edge is not valid. [AI]

Definition at line 170 of file legopathactor.cpp.

◆ VTable0x88()

MxResult LegoPathActor::VTable0x88 ( LegoPathBoundary p_boundary,
float  p_time,
LegoEdge p_srcEdge,
float  p_srcScale,
LegoUnknown100db7f4 p_destEdge,
float  p_destScale 
)
virtual

[AI] Moves the actor between two edges across a boundary, recalculates placement and orientation.

Used for path transition logic when traversing to a new edge. [AI]

Parameters
p_boundaryTarget boundary. [AI]
p_timeCurrent time. [AI]
p_srcEdgeSource edge (previous). [AI]
p_srcScaleRelative position on the source edge. [AI]
p_destEdgeDestination edge (next). [AI]
p_destScaleRelative position on the destination edge. [AI]
Returns
SUCCESS on placement, FAILURE if invalid. [AI]

Definition at line 93 of file legopathactor.cpp.

◆ VTable0x8c()

MxS32 LegoPathActor::VTable0x8c ( float  p_time,
Matrix4 p_transform 
)
virtual

[AI] Advance actor's position/state along the path for a given timeslice.

Handles navigation calculations, collision, and transforms. [AI]

Parameters
p_timeTime to simulate up to. [AI]
p_transformMatrix output with updated local transformation. [AI]
Returns
0 on success, 1 if collision occurred, -1 if error/stop. [AI]

Definition at line 237 of file legopathactor.cpp.

◆ VTable0x90()

virtual MxU32 LegoPathActor::VTable0x90 ( float  ,
Matrix4  
)
inlinevirtual

[AI] Placeholder for custom logic during per-timestep simulation for non-user-controlled animation.

[AI_SUGGESTED_NAME: PerTickSimulationFallback]

Parameters
-[AI]
Returns
Always FALSE (not handled). [AI]

Reimplemented in LegoExtraActor, LegoRaceActor, and Act3Actor.

Definition at line 176 of file legopathactor.h.

◆ VTable0x9c()

MxResult LegoPathActor::VTable0x9c ( )
virtual

[AI] Handles exit transition and next-edge search logic; also used for collision reaction and fallback.

[AI]

Returns
SUCCESS if handled, FAILURE otherwise. [AI]

Reimplemented in Act2Actor, Act3Cop, Act3Brickster, LegoExtraActor, LegoJetski, LegoRaceCar, and LegoCarRaceActor.

Definition at line 616 of file legopathactor.cpp.

◆ VTable0xa0()

virtual MxS32 LegoPathActor::VTable0xa0 ( )
inlinevirtual

[AI] Placeholder for custom extension.

Returns 0 by default. [AI]

Returns
0 [AI]

Reimplemented in Act2Actor.

Definition at line 207 of file legopathactor.h.

◆ VTable0xa4()

void LegoPathActor::VTable0xa4 ( MxBool p_und1,
MxS32 p_und2 
)
virtual

[AI] Returns information depending on actor type.

Used for animation/sound/camera variants. [AI]

Parameters
p_und1Output: TRUE/FALSE depending on actor type. [AI]
p_und2Output: Integer variant for this actor type. [AI]

Reimplemented in LegoExtraActor.

Definition at line 698 of file legopathactor.cpp.

◆ VTable0xa8()

void LegoPathActor::VTable0xa8 ( )
virtual

[AI] Re-applies transform to ROI, updates camera if needed, and processes per-actor tick actions.

[AI]

Definition at line 731 of file legopathactor.cpp.

◆ VTable0xb4()

virtual MxFloat LegoPathActor::VTable0xb4 ( )
inlinevirtual

[AI] Returns an internal value used in fallback collision/velocity calculation (proportional fudge factor).

[AI]

Returns
Scalar parameter used for bump resolution. [AI]

Definition at line 237 of file legopathactor.h.

◆ VTable0xb8()

virtual MxFloat LegoPathActor::VTable0xb8 ( )
inlinevirtual

[AI] Returns a damping/multiplier factor used for velocity reduction after collisions.

[AI]

Definition at line 242 of file legopathactor.h.

◆ VTable0xbc()

virtual void LegoPathActor::VTable0xbc ( MxFloat  p_unk0x140)
inlinevirtual

[AI] Sets the fudge parameter for fallback collision push-back.

[AI]

Parameters
p_unk0x140Value to set. [AI]

Definition at line 248 of file legopathactor.h.

◆ VTable0xc0()

virtual void LegoPathActor::VTable0xc0 ( MxFloat  p_unk0x144)
inlinevirtual

[AI] Sets the velocity damping factor after bump.

[AI]

Parameters
p_unk0x144Value to set. [AI]

Definition at line 254 of file legopathactor.h.

◆ VTable0xc4()

virtual void LegoPathActor::VTable0xc4 ( )
inlinevirtual

[AI] Empty handler for optional custom per-tick transition logic.

[AI]

Reimplemented in LegoExtraActor.

Definition at line 259 of file legopathactor.h.

◆ VTable0xc8()

virtual void LegoPathActor::VTable0xc8 ( MxU8  p_unk0x148)
inlinevirtual

[AI] Sets the rolling state (animation index, mainly for camera turning/curves).

[AI]

Parameters
p_unk0x148Rolling angle state. [AI]

Definition at line 265 of file legopathactor.h.

Member Data Documentation

◆ m_actorState

MxU32 LegoPathActor::m_actorState
protected

[AI] State and flags bitfield for path following logic. [AI]

Definition at line 388 of file legopathactor.h.

◆ m_actorTime

MxFloat LegoPathActor::m_actorTime
protected

[AI] Animation time for current path segment. [AI]

Definition at line 384 of file legopathactor.h.

◆ m_BADuration

MxFloat LegoPathActor::m_BADuration
protected

[AI] Duration of current Bezier arc (distance along path/current edge). [AI]

Definition at line 382 of file legopathactor.h.

◆ m_boundary

LegoPathBoundary* LegoPathActor::m_boundary
protected

[AI] Current boundary the actor is navigating on. [AI]

Definition at line 386 of file legopathactor.h.

◆ m_collideBox

MxBool LegoPathActor::m_collideBox
protected

[AI] Use bounding-box for more accurate collision. [AI]

Definition at line 391 of file legopathactor.h.

◆ m_destEdge

LegoUnknown100db7f4* LegoPathActor::m_destEdge
protected

[AI] Current or target edge for path traversal. [AI]

Definition at line 389 of file legopathactor.h.

◆ m_grec

LegoPathEdgeContainer* LegoPathActor::m_grec
protected

[AI] Edge/boundary helper for tracking transitions and stateful animation. [AI]

Definition at line 395 of file legopathactor.h.

◆ m_lastTime

MxFloat LegoPathActor::m_lastTime
protected

[AI] Time of last update (used for delta calculations). [AI]

Definition at line 385 of file legopathactor.h.

◆ m_maxLinearVel

MxFloat LegoPathActor::m_maxLinearVel
protected

[AI] Maximum speed of actor while moving along path. [AI]

Definition at line 397 of file legopathactor.h.

◆ m_pathController

LegoPathController* LegoPathActor::m_pathController
protected

[AI] Path controller/manages permitted boundaries for transitions. [AI]

Definition at line 396 of file legopathactor.h.

◆ m_unk0x140

MxFloat LegoPathActor::m_unk0x140
protected

[AI] Scaling factor for fallback/collision response logic. [AI]

Definition at line 398 of file legopathactor.h.

◆ m_unk0x144

MxFloat LegoPathActor::m_unk0x144
protected

[AI] Damping factor for velocity after collision ("bounce" friction). [AI]

Definition at line 399 of file legopathactor.h.

◆ m_unk0x148

MxU8 LegoPathActor::m_unk0x148
protected

[AI] Angle/animation mode for rolling/camera tilting. [AI]

Definition at line 400 of file legopathactor.h.

◆ m_unk0x14c

MxS32 LegoPathActor::m_unk0x14c
protected

[AI] Rolling angle delta (variant for camera logic). [AI]

Definition at line 401 of file legopathactor.h.

◆ m_unk0x150

MxFloat LegoPathActor::m_unk0x150
protected

[AI] Scalar factor for camera turn velocity logic. [AI]

Definition at line 402 of file legopathactor.h.

◆ m_unk0x7c

MxFloat LegoPathActor::m_unk0x7c
protected

[AI] Interpolator/progress state along curve segment. [AI]

Definition at line 383 of file legopathactor.h.

◆ m_unk0x8c

LegoUnknown LegoPathActor::m_unk0x8c
protected

[AI] Helper object for path curve interpolation and evaluation. [AI]

Definition at line 387 of file legopathactor.h.

◆ m_unk0xe4

MxFloat LegoPathActor::m_unk0xe4
protected

[AI] Position scalar on destination edge (0-1 across the edge). [AI]

Definition at line 390 of file legopathactor.h.

◆ m_unk0xe9

MxBool LegoPathActor::m_unk0xe9
protected

[AI] Stores latest intersection/collision status/type. [AI]

Definition at line 392 of file legopathactor.h.

◆ m_unk0xec

MxMatrix LegoPathActor::m_unk0xec
protected

[AI] World-to-local transformation matrix for this actor/ROI. [AI]

Definition at line 394 of file legopathactor.h.

◆ m_userNavFlag

MxBool LegoPathActor::m_userNavFlag
protected

[AI] TRUE if this actor is currently user/player controlled. [AI]

Definition at line 393 of file legopathactor.h.


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