Isle
|
[AI] Controller that links mouse actions to manipulation of the user's point of view in the 3D scene. More...
#include <legopointofviewcontroller.h>
Public Member Functions | |
LegoPointOfViewController () | |
[AI] Initializes state for coordinating mouse and point-of-view. [AI] More... | |
~LegoPointOfViewController () override | |
[AI] Destructor; cleans up any owned references. [AI] More... | |
MxResult | Tickle () override |
[AI] Called each frame (tick) to update the state of the point of view, potentially responding to input or animation. More... | |
void | LeftDown (int p_x, int p_y) override |
[AI] Called when left mouse button is pressed; may start point-of-view manipulation. More... | |
void | LeftDrag (int p_x, int p_y) override |
[AI] Called when cursor moves with left mouse button held; typically drags the point of view. More... | |
void | LeftUp (int p_x, int p_y) override |
[AI] Called when the left button is released, possibly to end the manipulation and update the camera/entity. More... | |
void | RightDown (int p_x, int p_y) override |
[AI] Called when the right mouse button is pressed; often used for alternative camera controls. More... | |
void | RightDrag (int p_x, int p_y) override |
[AI] Called when right button is held and cursor is moved, e.g., for rotational camera movement. More... | |
void | RightUp (int p_x, int p_y) override |
[AI] Called when the right mouse button is released, possibly to finalize alternative camera/entity action. More... | |
virtual void | SetEntity (LegoEntity *p_entity) |
[AI] Assign the entity which this controller operates on, typically to associate the point of view with a specific character or camera. More... | |
MxResult | Create (Lego3DView *p_lego3DView) |
[AI] Initializes the controller with a specific 3D view. More... | |
void | OnViewSize (int p_width, int p_height) |
[AI] Updates the controller's internal state for a view size change, such as resizing the 3D viewport. More... | |
LegoEntity * | GetEntity () |
[AI] Accessor for the currently attached entity. More... | |
LegoNavController * | GetNavController () |
[AI] Accessor for the navigation controller associated with this point-of-view controller. More... | |
![]() | |
LegoMouseController () | |
[AI] Constructor initializing state of mouse button. [AI] More... | |
~LegoMouseController () override | |
[AI] Destructor for mouse controller. [AI] More... | |
virtual void | LeftDown (int, int) |
[AI] Invoked when the left mouse button is pressed. More... | |
virtual void | LeftDrag (int, int) |
[AI] Invoked as the mouse drags while the left button is held. More... | |
virtual void | LeftUp (int, int) |
[AI] Invoked when the left mouse button is released. More... | |
virtual void | RightDown (int, int) |
[AI] Invoked when the right mouse button is pressed. More... | |
virtual void | RightDrag (int, int) |
[AI] Invoked as the mouse drags while the right button is held. More... | |
virtual void | RightUp (int, int) |
[AI] Invoked when the right mouse button is released. More... | |
BOOL | GetIsButtonDown () |
[AI] Returns whether any mouse button is currently in the 'down' state. More... | |
MxDouble | GetButtonX () |
[AI] Returns the X coordinate where the last mouse button event occurred. More... | |
MxDouble | GetButtonY () |
[AI] Returns the Y coordinate where the last mouse button event occurred. More... | |
![]() | |
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 | |
void | AffectPointOfView () |
[AI] Internal method to compute and apply the effect of user mouse input on the current point of view, entity, or camera, as appropriate. More... | |
Protected Attributes | |
Lego3DView * | m_lego3DView |
[AI] The active 3D view that input actions are translated into. [AI] More... | |
LegoEntity * | m_entity |
[AI] The entity whose point of view this controller manipulates. [AI] More... | |
MxDouble | m_entityOffsetUp |
[AI] Offset along the entity's upward vector (for perspective/camera alignment). [AI] More... | |
LegoNavController * | m_nav |
[AI] Navigation controller used to translate input to navigation/camera changes. [AI] More... | |
[AI] Controller that links mouse actions to manipulation of the user's point of view in the 3D scene.
[AI]
[AI] Extends LegoMouseController to apply mouse button and drag events to camera or entity point of view control. Connects actions such as dragging or clicking to navigation/camera manipulation, typically inside a 3D game view. Holds references to entity and navigation controller to enable direct manipulation and feedback. [AI]
Definition at line 106 of file legopointofviewcontroller.h.
LegoPointOfViewController::LegoPointOfViewController | ( | ) |
[AI] Initializes state for coordinating mouse and point-of-view. [AI]
Definition at line 82 of file legopovcontroller.cpp.
|
override |
[AI] Destructor; cleans up any owned references. [AI]
Definition at line 94 of file legopovcontroller.cpp.
|
protected |
[AI] Internal method to compute and apply the effect of user mouse input on the current point of view, entity, or camera, as appropriate.
[AI]
Definition at line 135 of file legopovcontroller.cpp.
MxResult LegoPointOfViewController::Create | ( | Lego3DView * | p_lego3DView | ) |
[AI] Initializes the controller with a specific 3D view.
[AI]
p_lego3DView | [AI] Target 3D view context for rendering and input. [AI] |
Definition at line 104 of file legopovcontroller.cpp.
|
inline |
[AI] Accessor for the currently attached entity.
[AI]
Definition at line 201 of file legopointofviewcontroller.h.
|
inline |
[AI] Accessor for the navigation controller associated with this point-of-view controller.
[AI]
Definition at line 206 of file legopointofviewcontroller.h.
|
overridevirtual |
[AI] Called when left mouse button is pressed; may start point-of-view manipulation.
[AI]
p_x | [AI] X coordinate. [AI] |
p_y | [AI] Y coordinate. [AI] |
Reimplemented from LegoMouseController.
Definition at line 121 of file legopovcontroller.cpp.
|
overridevirtual |
[AI] Called when cursor moves with left mouse button held; typically drags the point of view.
[AI]
p_x | [AI] New X coordinate. [AI] |
p_y | [AI] New Y coordinate. [AI] |
Reimplemented from LegoMouseController.
Definition at line 128 of file legopovcontroller.cpp.
|
inlineoverridevirtual |
[AI] Called when the left button is released, possibly to end the manipulation and update the camera/entity.
[AI]
p_x | [AI] Release X. [AI] |
p_y | [AI] Release Y. [AI] |
Reimplemented from LegoMouseController.
Definition at line 136 of file legopointofviewcontroller.h.
void LegoPointOfViewController::OnViewSize | ( | int | p_width, |
int | p_height | ||
) |
[AI] Updates the controller's internal state for a view size change, such as resizing the 3D viewport.
[AI]
p_width | [AI] New width in pixels. [AI] |
p_height | [AI] New height in pixels. [AI] |
Definition at line 115 of file legopovcontroller.cpp.
|
inlineoverridevirtual |
[AI] Called when the right mouse button is pressed; often used for alternative camera controls.
[AI]
p_x | [AI] X coordinate. [AI] |
p_y | [AI] Y coordinate. [AI] |
Reimplemented from LegoMouseController.
Definition at line 148 of file legopointofviewcontroller.h.
|
inlineoverridevirtual |
[AI] Called when right button is held and cursor is moved, e.g., for rotational camera movement.
[AI]
p_x | [AI] New X coordinate. [AI] |
p_y | [AI] New Y coordinate. [AI] |
Reimplemented from LegoMouseController.
Definition at line 160 of file legopointofviewcontroller.h.
|
inlineoverridevirtual |
[AI] Called when the right mouse button is released, possibly to finalize alternative camera/entity action.
[AI]
p_x | [AI] Release X coordinate. [AI] |
p_y | [AI] Release Y coordinate. [AI] |
Reimplemented from LegoMouseController.
Definition at line 172 of file legopointofviewcontroller.h.
|
virtual |
[AI] Assign the entity which this controller operates on, typically to associate the point of view with a specific character or camera.
[AI]
p_entity | [AI] Pointer to target LegoEntity. [AI] |
Definition at line 192 of file legopovcontroller.cpp.
|
overridevirtual |
[AI] Called each frame (tick) to update the state of the point of view, potentially responding to input or animation.
[AI]
Reimplemented from MxCore.
Definition at line 142 of file legopovcontroller.cpp.
|
protected |
[AI] The entity whose point of view this controller manipulates. [AI]
Definition at line 215 of file legopointofviewcontroller.h.
|
protected |
[AI] Offset along the entity's upward vector (for perspective/camera alignment). [AI]
Definition at line 216 of file legopointofviewcontroller.h.
|
protected |
[AI] The active 3D view that input actions are translated into. [AI]
Definition at line 214 of file legopointofviewcontroller.h.
|
protected |
[AI] Navigation controller used to translate input to navigation/camera changes. [AI]
Definition at line 217 of file legopointofviewcontroller.h.