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

[AI] Handles user navigation input (keyboard and joystick) and determines avatar movement and direction in the world. More...

#include <legonavcontroller.h>

Inheritance diagram for LegoNavController:
Collaboration diagram for LegoNavController:

Public Member Functions

 LegoNavController ()
 [AI] Constructs a navigation controller and registers it for input processing. More...
 
 ~LegoNavController () override
 [AI] Destroys the controller and unregisters it from input processing. More...
 
MxLong Notify (MxParam &p_param) override
 [AI] Responds to notifications, including keypresses and special debug shortcuts for avatar control, animation, and world management. More...
 
const char * ClassName () const override
 [AI] Returns this class's string name: "LegoNavController". More...
 
MxBool IsA (const char *p_name) const override
 [AI] Tests if this object is of type "LegoNavController" or any MxCore ancestor. More...
 
void SetTargets (int p_hPos, int p_vPos, MxBool p_accel)
 [AI] Set the horizontal/vertical target positions from input and optionally apply acceleration/dynamics. More...
 
void SetControlMax (int p_hMax, int p_vMax)
 [AI] Set limits for horizontal and vertical input controls, typically reflecting window/screen size. More...
 
void SetToDefaultParams ()
 [AI] Resets current navigation parameters to globally set defaults. More...
 
MxBool CalculateNewPosDir (const Vector3 &p_curPos, const Vector3 &p_curDir, Vector3 &p_newPos, Vector3 &p_newDir, const Vector3 *p_und)
 [AI] Calculates the new position and direction vectors based on input, current velocity, and elapsed time. More...
 
void SetLinearVel (MxFloat p_linearVel)
 [AI] Sets the current linear velocity for user navigation. More...
 
void SetDeadZone (MxS32 p_deadZone)
 [AI] Sets the deadzone radius for input processing (region within which inputs are ignored). More...
 
void SetTrackDefault (MxS32 p_trackDefault)
 [AI] Marks the controller to track global/default navigation parameters rather than custom overrides. More...
 
void Reset ()
 [AI] Resets the internal navigation state and all navigation parameters to current defaults. More...
 
MxFloat GetLinearVel ()
 [AI] Returns the current linear velocity (units per sec). More...
 
MxFloat GetRotationalVel ()
 [AI] Returns the current rotational velocity (degrees per sec). More...
 
MxFloat GetMaxLinearVel ()
 [AI] Returns the current maximum linear velocity (units per sec). More...
 
MxFloat GetMaxLinearAccel ()
 [AI] Returns the current maximum linear acceleration. More...
 
MxFloat GetMaxLinearDeccel ()
 [AI] Returns the current maximum linear deceleration. More...
 
void ResetMaxLinearVel (MxFloat p_maxLinearVel)
 [AI] Resets the maximum allowed linear velocity and marks controller as using custom parameters. More...
 
void ResetMaxLinearAccel (MxFloat p_maxLinearAccel)
 [AI] Resets the maximum allowed linear acceleration and marks controller as using custom parameters. More...
 
void ResetMaxLinearDeccel (MxFloat p_maxLinearDeccel)
 [AI] Resets the maximum allowed linear deceleration and marks controller as using custom parameters. More...
 
int GetDefaultDeadZone ()
 [AI] Returns the application-global default deadzone value for navigation input processing. 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...
 

Static Public Member Functions

static void GetDefaults (int *p_dz, float *p_lv, float *p_rv, float *p_la, float *p_ra, float *p_ld, float *p_rd, float *p_lmina, float *p_rmina, float *p_rs, MxBool *p_urs)
 [AI] Static: Retrieves current global default navigation parameter values. More...
 
static void SetDefaults (int p_dz, float p_lv, float p_rv, float p_la, float p_ra, float p_ld, float p_rd, float p_lmina, float p_rmina, float p_rs, MxBool p_urs)
 [AI] Static: Sets new global defaults for navigation parameters. More...
 
static MxResult UpdateLocation (MxU32 p_location)
 [AI] Static: Changes the current world/camera location to the specified index in the location registry. More...
 
static MxResult UpdateLocation (const char *p_location)
 [AI] Static: Sets the world/camera location to a location registered by name. More...
 
static MxS32 GetNumLocations ()
 [AI] Static: Retrieves the number of named locations registered in the navigation system. More...
 
static LegoLocationGetLocation (MxU32 p_location)
 [AI] Static: Retrieves the pointer to a LegoLocation struct by its index. More...
 

Protected Member Functions

float CalculateNewVel (float p_targetVel, float p_currentVel, float p_accel, float p_time)
 [AI] Calculates the next velocity given a target velocity, current velocity, acceleration, and elapsed time, clamped as needed. More...
 
float CalculateNewTargetVel (int p_pos, int p_center, float p_max)
 [AI] Translates control position into a new target velocity, applying deadzone and centering logic. More...
 
float CalculateNewAccel (int p_pos, int p_center, float p_max, int p_min)
 [AI] Computes new acceleration value based on position, axis center, maximum and minimum acceleration. More...
 
MxResult ProcessJoystickInput (MxBool &p_und)
 [AI] Processes current joystick/gamepad input and updates navigation targets and accelerations. More...
 
MxResult ProcessKeyboardInput ()
 [AI] Reads and processes keyboard navigation input to update velocity/acceleration targets. More...
 

Protected Attributes

int m_hMax
 [AI] Current horizontal axis control maximum (e.g., 640 for screen width). More...
 
int m_vMax
 [AI] Current vertical axis control maximum (e.g., 480 for screen height). More...
 
int m_deadZone
 [AI] Deadzone value; minimum distance input must be from axis center to register as movement. More...
 
float m_zeroThreshold
 [AI] Threshold below which movements are considered negligible/zero. More...
 
float m_linearVel
 [AI] Current linear velocity. More...
 
float m_rotationalVel
 [AI] Current rotational velocity. More...
 
float m_targetLinearVel
 [AI] Target value for linear velocity, used for acceleration smoothing. More...
 
float m_targetRotationalVel
 [AI] Target value for rotational velocity, used for smoothing. More...
 
float m_maxLinearVel
 [AI] Maximum allowed linear velocity. More...
 
float m_maxRotationalVel
 [AI] Maximum allowed rotational velocity. More...
 
float m_linearAccel
 [AI] Current linear acceleration used to interpolate linear velocity. More...
 
float m_rotationalAccel
 [AI] Current rotational acceleration used to interpolate rotational velocity. More...
 
float m_maxLinearAccel
 [AI] Maximum allowed linear acceleration. More...
 
float m_maxRotationalAccel
 [AI] Maximum allowed rotational acceleration. More...
 
float m_minLinearAccel
 [AI] Minimum allowed linear acceleration. More...
 
float m_minRotationalAccel
 [AI] Minimum allowed rotational acceleration. More...
 
float m_maxLinearDeccel
 [AI] Maximum allowed linear deceleration (negative accel). More...
 
float m_maxRotationalDeccel
 [AI] Maximum allowed rotational deceleration. More...
 
float m_rotSensitivity
 [AI] Sensitivity multiplier for rotation (applies if useRotationalVel is FALSE). More...
 
MxBool m_useRotationalVel
 [AI] If TRUE, rotation is determined by velocity (dynamic turning); if FALSE, snaps turn instantly. More...
 
MxTime m_lastTime
 [AI] Tracks time of the last navigation tick for smooth movement with deltaTime. More...
 
MxBool m_trackDefault
 [AI] TRUE if navigation parameters should match the application defaults; FALSE to allow per-instance override. More...
 
MxBool m_unk0x5d
 [AI] Indicates that Notify() should inject a one-time movement/turn based on special debug or event triggers. More...
 
float m_unk0x60
 [AI] [Usage: debug/direct movement] Y-offset applied to next position after Notify key event. More...
 
float m_unk0x64
 [AI] [Usage: debug/direct movement] Linear velocity applied to next position after Notify key event. More...
 
float m_unk0x68
 [AI] [Usage: debug/direct movement] Rotational offset (degrees), to next direction vector after Notify event. More...
 
MxBool m_isAccelerating
 [AI] TRUE if last input was an active movement/acceleration (vs. More...
 

Static Protected Attributes

static int g_defdeadZone = 40
 [AI] Application-global default deadzone value. More...
 
static float g_defzeroThreshold = 0.001f
 [AI] Application-global default zero threshold value. More...
 
static float g_defmaxLinearVel = 40.0f
 [AI] Application-global default max linear velocity. More...
 
static float g_defmaxRotationalVel = 20.0f
 [AI] Application-global default max rotational velocity. More...
 
static float g_defmaxLinearAccel = 15.0f
 [AI] Application-global default max linear acceleration. More...
 
static float g_defmaxRotationalAccel = 30.0f
 [AI] Application-global default max rotational acceleration. More...
 
static float g_defminLinearAccel = 4.0f
 [AI] Application-global default min linear acceleration. More...
 
static float g_defminRotationalAccel = 15.0f
 [AI] Application-global default min rotational acceleration. More...
 
static float g_defmaxLinearDeccel = 50.0f
 [AI] Application-global default max linear deceleration. More...
 
static float g_defmaxRotationalDeccel = 50.0f
 [AI] Application-global default max rotational deceleration. More...
 
static float g_defrotSensitivity = 0.4f
 [AI] Application-global default rotation sensitivity. More...
 
static MxBool g_defuseRotationalVel = FALSE
 [AI] Application-global default for useRotationalVel. More...
 

Detailed Description

[AI] Handles user navigation input (keyboard and joystick) and determines avatar movement and direction in the world.

It encapsulates logic for target position/velocity setting, acceleration/deceleration, and navigation parameter defaults for LEGO Island's 3D world.

[AI] LegoNavController centralizes the logic for player-controlled navigation within the LEGO Island engine. It interprets user input (both keyboard and joystick), manages transitions between velocity/acceleration targets, and integrates movement into the engine's control loop. It provides interfaces for updating viewpoints to named "locations" and allows application-based adjustment of navigation dynamics (accel/decel/sensitivity/deadzone).

Definition at line 23 of file legonavcontroller.h.

Constructor & Destructor Documentation

◆ LegoNavController()

LegoNavController::LegoNavController ( )

[AI] Constructs a navigation controller and registers it for input processing.

Definition at line 126 of file legonavcontroller.cpp.

◆ ~LegoNavController()

LegoNavController::~LegoNavController ( )
override

[AI] Destroys the controller and unregisters it from input processing.

Definition at line 149 of file legonavcontroller.cpp.

Member Function Documentation

◆ CalculateNewAccel()

float LegoNavController::CalculateNewAccel ( int  p_pos,
int  p_center,
float  p_max,
int  p_min 
)
protected

[AI] Computes new acceleration value based on position, axis center, maximum and minimum acceleration.

Parameters
p_posInput axis position. [AI]
p_centerCenter value of the axis. [AI]
p_maxMaximum allowed acceleration. [AI]
p_minMinimum allowed acceleration. [AI]
Returns
New acceleration. [AI]

Definition at line 281 of file legonavcontroller.cpp.

◆ CalculateNewPosDir()

MxBool LegoNavController::CalculateNewPosDir ( const Vector3 p_curPos,
const Vector3 p_curDir,
Vector3 p_newPos,
Vector3 p_newDir,
const Vector3 p_und 
)

[AI] Calculates the new position and direction vectors based on input, current velocity, and elapsed time.

Parameters
p_curPosCurrent position in world coordinates. [AI]
p_curDirCurrent view or movement direction. [AI]
p_newPos[out] Populated with computed new position vector. [AI]
p_newDir[out] Populated with computed new direction vector. [AI]
p_undOptional pointer to up-direction vector; affects calculation for inverse navigation/rotation direction. [AI]
Returns
TRUE if position or direction changed, FALSE otherwise. [AI]

Definition at line 320 of file legonavcontroller.cpp.

◆ CalculateNewTargetVel()

float LegoNavController::CalculateNewTargetVel ( int  p_pos,
int  p_center,
float  p_max 
)
protected

[AI] Translates control position into a new target velocity, applying deadzone and centering logic.

Parameters
p_posCurrent axis position (input region, e.g., mouse/joystick). [AI]
p_centerCenter value of the axis. [AI]
p_maxMaximum allowed velocity for this axis. [AI]
Returns
New target velocity. [AI]

Definition at line 262 of file legonavcontroller.cpp.

◆ CalculateNewVel()

float LegoNavController::CalculateNewVel ( float  p_targetVel,
float  p_currentVel,
float  p_accel,
float  p_time 
)
protected

[AI] Calculates the next velocity given a target velocity, current velocity, acceleration, and elapsed time, clamped as needed.

Parameters
p_targetVelThe target velocity to approach. [AI]
p_currentVelThe current velocity. [AI]
p_accelThe acceleration to use. [AI]
p_timeTime elapsed since last calculation (seconds). [AI]
Returns
New velocity value. [AI]

Definition at line 296 of file legonavcontroller.cpp.

◆ ClassName()

const char * LegoNavController::ClassName ( ) const
inlineoverridevirtual

[AI] Returns this class's string name: "LegoNavController".

Returns
Name string literal. [AI]

Reimplemented from MxCore.

Definition at line 46 of file legonavcontroller.h.

◆ GetDefaultDeadZone()

int LegoNavController::GetDefaultDeadZone ( )
inline

[AI] Returns the application-global default deadzone value for navigation input processing.

Returns
Integer deadzone value. [AI]

Definition at line 268 of file legonavcontroller.h.

◆ GetDefaults()

void LegoNavController::GetDefaults ( int *  p_dz,
float *  p_lv,
float *  p_rv,
float *  p_la,
float *  p_ra,
float *  p_ld,
float *  p_rd,
float *  p_lmina,
float *  p_rmina,
float *  p_rs,
MxBool p_urs 
)
static

[AI] Static: Retrieves current global default navigation parameter values.

Parameters
p_dz[out] Deadzone threshold. [AI]
p_lv[out] Maximum linear velocity. [AI]
p_rv[out] Maximum rotational velocity. [AI]
p_la[out] Maximum linear acceleration. [AI]
p_ra[out] Maximum rotational acceleration. [AI]
p_ld[out] Maximum linear deceleration. [AI]
p_rd[out] Maximum rotational deceleration. [AI]
p_lmina[out] Minimum linear acceleration. [AI]
p_rmina[out] Minimum rotational acceleration. [AI]
p_rs[out] Rotation sensitivity. [AI]
p_urs[out] Use rotational velocity flag. [AI]

Definition at line 185 of file legonavcontroller.cpp.

◆ GetLinearVel()

MxFloat LegoNavController::GetLinearVel ( )
inline

[AI] Returns the current linear velocity (units per sec).

Definition at line 212 of file legonavcontroller.h.

◆ GetLocation()

LegoLocation * LegoNavController::GetLocation ( MxU32  p_location)
static

[AI] Static: Retrieves the pointer to a LegoLocation struct by its index.

Parameters
p_locationIndex into the global location array. [AI]
Returns
Pointer to the location struct, or NULL if out of bounds. [AI]

Definition at line 502 of file legonavcontroller.cpp.

◆ GetMaxLinearAccel()

MxFloat LegoNavController::GetMaxLinearAccel ( )
inline

[AI] Returns the current maximum linear acceleration.

Definition at line 227 of file legonavcontroller.h.

◆ GetMaxLinearDeccel()

MxFloat LegoNavController::GetMaxLinearDeccel ( )
inline

[AI] Returns the current maximum linear deceleration.

Definition at line 232 of file legonavcontroller.h.

◆ GetMaxLinearVel()

MxFloat LegoNavController::GetMaxLinearVel ( )
inline

[AI] Returns the current maximum linear velocity (units per sec).

Definition at line 222 of file legonavcontroller.h.

◆ GetNumLocations()

MxS32 LegoNavController::GetNumLocations ( )
static

[AI] Static: Retrieves the number of named locations registered in the navigation system.

Returns
Number of available locations. [AI]

Definition at line 512 of file legonavcontroller.cpp.

◆ GetRotationalVel()

MxFloat LegoNavController::GetRotationalVel ( )
inline

[AI] Returns the current rotational velocity (degrees per sec).

Definition at line 217 of file legonavcontroller.h.

◆ IsA()

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

[AI] Tests if this object is of type "LegoNavController" or any MxCore ancestor.

Parameters
p_nameClass or ancestor class name to test. [AI]
Returns
TRUE if type matches; FALSE otherwise. [AI]

Reimplemented from MxCore.

Definition at line 57 of file legonavcontroller.h.

◆ Notify()

MxLong LegoNavController::Notify ( MxParam p_param)
overridevirtual

[AI] Responds to notifications, including keypresses and special debug shortcuts for avatar control, animation, and world management.

Parameters
p_paramNotification or event parameter, often a keypress or controller event. [AI]
Returns
Returns 0 in all cases. [AI]

Reimplemented from MxCore.

Definition at line 648 of file legonavcontroller.cpp.

◆ ProcessJoystickInput()

MxResult LegoNavController::ProcessJoystickInput ( MxBool p_und)
protected

[AI] Processes current joystick/gamepad input and updates navigation targets and accelerations.

Parameters
p_und[out] Set TRUE if the joystick POV control resulted in freeview rotation (e.g., camera rotation from D-pad hatswitch). [AI]
Returns
SUCCESS if joystick data was read and applied, FAILURE otherwise. [AI]

Definition at line 518 of file legonavcontroller.cpp.

◆ ProcessKeyboardInput()

MxResult LegoNavController::ProcessKeyboardInput ( )
protected

[AI] Reads and processes keyboard navigation input to update velocity/acceleration targets.

Returns
SUCCESS if keys are active and state processed, FAILURE otherwise. [AI]

Definition at line 565 of file legonavcontroller.cpp.

◆ Reset()

void LegoNavController::Reset ( )
inline

[AI] Resets the internal navigation state and all navigation parameters to current defaults.

Definition at line 203 of file legonavcontroller.h.

◆ ResetMaxLinearAccel()

void LegoNavController::ResetMaxLinearAccel ( MxFloat  p_maxLinearAccel)
inline

[AI] Resets the maximum allowed linear acceleration and marks controller as using custom parameters.

Parameters
p_maxLinearAccelNew value for maximum linear acceleration. [AI]

Definition at line 248 of file legonavcontroller.h.

◆ ResetMaxLinearDeccel()

void LegoNavController::ResetMaxLinearDeccel ( MxFloat  p_maxLinearDeccel)
inline

[AI] Resets the maximum allowed linear deceleration and marks controller as using custom parameters.

Parameters
p_maxLinearDeccelNew value for maximum linear deceleration. [AI]

Definition at line 258 of file legonavcontroller.h.

◆ ResetMaxLinearVel()

void LegoNavController::ResetMaxLinearVel ( MxFloat  p_maxLinearVel)
inline

[AI] Resets the maximum allowed linear velocity and marks controller as using custom parameters.

Parameters
p_maxLinearVelNew value for maximum linear velocity. [AI]

Definition at line 238 of file legonavcontroller.h.

◆ SetControlMax()

void LegoNavController::SetControlMax ( int  p_hMax,
int  p_vMax 
)

[AI] Set limits for horizontal and vertical input controls, typically reflecting window/screen size.

Parameters
p_hMaxMaximum horizontal value (e.g., 640 for fullscreen). [AI]
p_vMaxMaximum vertical value (e.g., 480 for fullscreen). [AI]

Definition at line 155 of file legonavcontroller.cpp.

◆ SetDeadZone()

void LegoNavController::SetDeadZone ( MxS32  p_deadZone)
inline

[AI] Sets the deadzone radius for input processing (region within which inputs are ignored).

Parameters
p_deadZoneDeadzone value in input units. [AI]

Definition at line 192 of file legonavcontroller.h.

◆ SetDefaults()

void LegoNavController::SetDefaults ( int  p_dz,
float  p_lv,
float  p_rv,
float  p_la,
float  p_ra,
float  p_ld,
float  p_rd,
float  p_lmina,
float  p_rmina,
float  p_rs,
MxBool  p_urs 
)
static

[AI] Static: Sets new global defaults for navigation parameters.

Parameters
p_dzDeadzone threshold. [AI]
p_lvMaximum linear velocity. [AI]
p_rvMaximum rotational velocity. [AI]
p_laMaximum linear acceleration. [AI]
p_raMaximum rotational acceleration. [AI]
p_ldMaximum linear deceleration. [AI]
p_rdMaximum rotational deceleration. [AI]
p_lminaMinimum linear acceleration. [AI]
p_rminaMinimum rotational acceleration. [AI]
p_rsRotation sensitivity. [AI]
p_ursUse rotational velocity flag. [AI]

Definition at line 213 of file legonavcontroller.cpp.

◆ SetLinearVel()

void LegoNavController::SetLinearVel ( MxFloat  p_linearVel)
inline

[AI] Sets the current linear velocity for user navigation.

Parameters
p_linearVelNew linear velocity value. [AI]

Definition at line 186 of file legonavcontroller.h.

◆ SetTargets()

void LegoNavController::SetTargets ( int  p_hPos,
int  p_vPos,
MxBool  p_accel 
)

[AI] Set the horizontal/vertical target positions from input and optionally apply acceleration/dynamics.

Parameters
p_hPosTarget X/horizontal position (e.g., joystick, mouse, etc). [AI]
p_vPosTarget Y/vertical position (e.g., joystick, mouse, etc). [AI]
p_accelIf TRUE, use acceleration (smooth ramping) toward target, otherwise jumps directly. [AI]

Definition at line 241 of file legonavcontroller.cpp.

◆ SetToDefaultParams()

void LegoNavController::SetToDefaultParams ( )

[AI] Resets current navigation parameters to globally set defaults.

Definition at line 168 of file legonavcontroller.cpp.

◆ SetTrackDefault()

void LegoNavController::SetTrackDefault ( MxS32  p_trackDefault)
inline

[AI] Marks the controller to track global/default navigation parameters rather than custom overrides.

Parameters
p_trackDefaultIf TRUE, controller tracks default params. [AI]

Definition at line 198 of file legonavcontroller.h.

◆ UpdateLocation() [1/2]

MxResult LegoNavController::UpdateLocation ( const char *  p_location)
static

[AI] Static: Sets the world/camera location to a location registered by name.

Parameters
p_locationName string as registered in LegoLocation. [AI]
Returns
SUCCESS if found and updated, FAILURE otherwise. [AI]

Definition at line 431 of file legonavcontroller.cpp.

◆ UpdateLocation() [2/2]

MxResult LegoNavController::UpdateLocation ( MxU32  p_location)
static

[AI] Static: Changes the current world/camera location to the specified index in the location registry.

Parameters
p_locationIndex into the known locations array. [AI]
Returns
SUCCESS if valid, FAILURE otherwise. [AI]

Definition at line 465 of file legonavcontroller.cpp.

Member Data Documentation

◆ g_defdeadZone

int LegoNavController::g_defdeadZone = 40
staticprotected

[AI] Application-global default deadzone value.

Definition at line 455 of file legonavcontroller.h.

◆ g_defmaxLinearAccel

float LegoNavController::g_defmaxLinearAccel = 15.0f
staticprotected

[AI] Application-global default max linear acceleration.

Definition at line 475 of file legonavcontroller.h.

◆ g_defmaxLinearDeccel

float LegoNavController::g_defmaxLinearDeccel = 50.0f
staticprotected

[AI] Application-global default max linear deceleration.

Definition at line 495 of file legonavcontroller.h.

◆ g_defmaxLinearVel

float LegoNavController::g_defmaxLinearVel = 40.0f
staticprotected

[AI] Application-global default max linear velocity.

Definition at line 465 of file legonavcontroller.h.

◆ g_defmaxRotationalAccel

float LegoNavController::g_defmaxRotationalAccel = 30.0f
staticprotected

[AI] Application-global default max rotational acceleration.

Definition at line 480 of file legonavcontroller.h.

◆ g_defmaxRotationalDeccel

float LegoNavController::g_defmaxRotationalDeccel = 50.0f
staticprotected

[AI] Application-global default max rotational deceleration.

Definition at line 500 of file legonavcontroller.h.

◆ g_defmaxRotationalVel

float LegoNavController::g_defmaxRotationalVel = 20.0f
staticprotected

[AI] Application-global default max rotational velocity.

Definition at line 470 of file legonavcontroller.h.

◆ g_defminLinearAccel

float LegoNavController::g_defminLinearAccel = 4.0f
staticprotected

[AI] Application-global default min linear acceleration.

Definition at line 485 of file legonavcontroller.h.

◆ g_defminRotationalAccel

float LegoNavController::g_defminRotationalAccel = 15.0f
staticprotected

[AI] Application-global default min rotational acceleration.

Definition at line 490 of file legonavcontroller.h.

◆ g_defrotSensitivity

float LegoNavController::g_defrotSensitivity = 0.4f
staticprotected

[AI] Application-global default rotation sensitivity.

Definition at line 505 of file legonavcontroller.h.

◆ g_defuseRotationalVel

MxBool LegoNavController::g_defuseRotationalVel = FALSE
staticprotected

[AI] Application-global default for useRotationalVel.

Definition at line 510 of file legonavcontroller.h.

◆ g_defzeroThreshold

float LegoNavController::g_defzeroThreshold = 0.001f
staticprotected

[AI] Application-global default zero threshold value.

Definition at line 460 of file legonavcontroller.h.

◆ m_deadZone

int LegoNavController::m_deadZone
protected

[AI] Deadzone value; minimum distance input must be from axis center to register as movement.

Definition at line 329 of file legonavcontroller.h.

◆ m_hMax

int LegoNavController::m_hMax
protected

[AI] Current horizontal axis control maximum (e.g., 640 for screen width).

Definition at line 319 of file legonavcontroller.h.

◆ m_isAccelerating

MxBool LegoNavController::m_isAccelerating
protected

[AI] TRUE if last input was an active movement/acceleration (vs.

at rest).

Definition at line 449 of file legonavcontroller.h.

◆ m_lastTime

MxTime LegoNavController::m_lastTime
protected

[AI] Tracks time of the last navigation tick for smooth movement with deltaTime.

Definition at line 419 of file legonavcontroller.h.

◆ m_linearAccel

float LegoNavController::m_linearAccel
protected

[AI] Current linear acceleration used to interpolate linear velocity.

Definition at line 369 of file legonavcontroller.h.

◆ m_linearVel

float LegoNavController::m_linearVel
protected

[AI] Current linear velocity.

Definition at line 339 of file legonavcontroller.h.

◆ m_maxLinearAccel

float LegoNavController::m_maxLinearAccel
protected

[AI] Maximum allowed linear acceleration.

Definition at line 379 of file legonavcontroller.h.

◆ m_maxLinearDeccel

float LegoNavController::m_maxLinearDeccel
protected

[AI] Maximum allowed linear deceleration (negative accel).

Definition at line 399 of file legonavcontroller.h.

◆ m_maxLinearVel

float LegoNavController::m_maxLinearVel
protected

[AI] Maximum allowed linear velocity.

Definition at line 359 of file legonavcontroller.h.

◆ m_maxRotationalAccel

float LegoNavController::m_maxRotationalAccel
protected

[AI] Maximum allowed rotational acceleration.

Definition at line 384 of file legonavcontroller.h.

◆ m_maxRotationalDeccel

float LegoNavController::m_maxRotationalDeccel
protected

[AI] Maximum allowed rotational deceleration.

Definition at line 404 of file legonavcontroller.h.

◆ m_maxRotationalVel

float LegoNavController::m_maxRotationalVel
protected

[AI] Maximum allowed rotational velocity.

Definition at line 364 of file legonavcontroller.h.

◆ m_minLinearAccel

float LegoNavController::m_minLinearAccel
protected

[AI] Minimum allowed linear acceleration.

Definition at line 389 of file legonavcontroller.h.

◆ m_minRotationalAccel

float LegoNavController::m_minRotationalAccel
protected

[AI] Minimum allowed rotational acceleration.

Definition at line 394 of file legonavcontroller.h.

◆ m_rotationalAccel

float LegoNavController::m_rotationalAccel
protected

[AI] Current rotational acceleration used to interpolate rotational velocity.

Definition at line 374 of file legonavcontroller.h.

◆ m_rotationalVel

float LegoNavController::m_rotationalVel
protected

[AI] Current rotational velocity.

Definition at line 344 of file legonavcontroller.h.

◆ m_rotSensitivity

float LegoNavController::m_rotSensitivity
protected

[AI] Sensitivity multiplier for rotation (applies if useRotationalVel is FALSE).

Definition at line 409 of file legonavcontroller.h.

◆ m_targetLinearVel

float LegoNavController::m_targetLinearVel
protected

[AI] Target value for linear velocity, used for acceleration smoothing.

Definition at line 349 of file legonavcontroller.h.

◆ m_targetRotationalVel

float LegoNavController::m_targetRotationalVel
protected

[AI] Target value for rotational velocity, used for smoothing.

Definition at line 354 of file legonavcontroller.h.

◆ m_trackDefault

MxBool LegoNavController::m_trackDefault
protected

[AI] TRUE if navigation parameters should match the application defaults; FALSE to allow per-instance override.

Definition at line 424 of file legonavcontroller.h.

◆ m_unk0x5d

MxBool LegoNavController::m_unk0x5d
protected

[AI] Indicates that Notify() should inject a one-time movement/turn based on special debug or event triggers.

Definition at line 429 of file legonavcontroller.h.

◆ m_unk0x60

float LegoNavController::m_unk0x60
protected

[AI] [Usage: debug/direct movement] Y-offset applied to next position after Notify key event.

Definition at line 434 of file legonavcontroller.h.

◆ m_unk0x64

float LegoNavController::m_unk0x64
protected

[AI] [Usage: debug/direct movement] Linear velocity applied to next position after Notify key event.

Definition at line 439 of file legonavcontroller.h.

◆ m_unk0x68

float LegoNavController::m_unk0x68
protected

[AI] [Usage: debug/direct movement] Rotational offset (degrees), to next direction vector after Notify event.

Definition at line 444 of file legonavcontroller.h.

◆ m_useRotationalVel

MxBool LegoNavController::m_useRotationalVel
protected

[AI] If TRUE, rotation is determined by velocity (dynamic turning); if FALSE, snaps turn instantly.

Definition at line 414 of file legonavcontroller.h.

◆ m_vMax

int LegoNavController::m_vMax
protected

[AI] Current vertical axis control maximum (e.g., 480 for screen height).

Definition at line 324 of file legonavcontroller.h.

◆ m_zeroThreshold

float LegoNavController::m_zeroThreshold
protected

[AI] Threshold below which movements are considered negligible/zero.

Definition at line 334 of file legonavcontroller.h.


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