|
Isle
|
Camera controller for 3D scenes, handles interactive camera manipulation and view transformation. More...
#include <legocameracontroller.h>


Public Member Functions | |
| LegoCameraController () | |
| Constructor. More... | |
| ~LegoCameraController () override | |
| Destructor. More... | |
| MxLong | Notify (MxParam &p_param) override |
| Handles notifications for camera-relevant events (like mouse drag and mouse clicks). More... | |
| const char * | ClassName () const override |
| Returns the runtime class name for this type. More... | |
| MxBool | IsA (const char *p_name) const override |
| Checks if the name is compatible with this type or its ancestors. More... | |
| virtual void | OnLButtonDown (MxPoint32 p_point) |
| Called when the left mouse button is pressed at a screen point. More... | |
| virtual void | OnLButtonUp (MxPoint32 p_point) |
| Called when the left mouse button is released at a screen point. More... | |
| virtual void | OnRButtonDown (MxPoint32 p_point) |
| Called when the right mouse button is pressed at a screen point. More... | |
| virtual void | OnRButtonUp (MxPoint32 p_point) |
| Called when the right mouse button is released at a screen point. More... | |
| virtual void | OnMouseMove (MxU8 p_modifier, MxPoint32 p_point) |
| Called when the mouse is moved. More... | |
| virtual MxResult | Create () |
| Registers the camera controller with input manager and initializes state with current view. More... | |
| void | SetWorldTransform (const Vector3 &p_at, const Vector3 &p_dir, const Vector3 &p_up) |
| Updates the camera's world transformation matrix using view reference parameters. More... | |
| void | FUN_10012290 (float p_angle) |
| Rotates the current camera transformation by a given angle around the Z axis. More... | |
| void | FUN_10012320 (float p_angle) |
| Rotates the current camera transformation by a given angle around the Y axis. More... | |
| MxResult | FUN_100123b0 (Matrix4 &p_matrix) |
| Retrieves the current point-of-view transformation into a matrix if it exists. More... | |
| void | FUN_100123e0 (const Matrix4 &p_transform, MxU32 p_und) |
| Sets the camera's transformation matrix in the 3D view, optionally applying a blend with the internal matrix. More... | |
| Mx3DPointFloat | GetWorldUp () |
| Gets the camera's current world-space up vector. More... | |
| Mx3DPointFloat | GetWorldLocation () |
| Gets the camera's current world-space location. More... | |
| Mx3DPointFloat | GetWorldDirection () |
| Gets the camera's world-space forward direction vector. More... | |
Public Member Functions inherited from LegoPointOfViewController | |
| 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... | |
Public Member Functions inherited from LegoMouseController | |
| 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... | |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from LegoPointOfViewController | |
| 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 inherited from LegoPointOfViewController | |
| 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... | |
Camera controller for 3D scenes, handles interactive camera manipulation and view transformation.
[AI]
Inherits from LegoPointOfViewController. Handles left/right mouse button and mouse movement to manipulate a camera's position and orientation within a 3D world. Maintains two transformation matrices for current and original state, and is capable of interacting with sound and video managers to reflect the new camera positions. [AI]
Definition at line 17 of file legocameracontroller.h.
| LegoCameraController::LegoCameraController | ( | ) |
Constructor.
Initializes the camera's world transform to a default pose at origin, looking forward. [AI]
Definition at line 18 of file legocameracontroller.cpp.
|
override |
Destructor.
Cleans up and deregisters the camera from the input manager if set. [AI]
Definition at line 24 of file legocameracontroller.cpp.
|
inlineoverridevirtual |
Returns the runtime class name for this type.
[AI]
Reimplemented from MxCore.
Definition at line 40 of file legocameracontroller.h.
|
virtual |
Registers the camera controller with input manager and initializes state with current view.
[AI]
Definition at line 34 of file legocameracontroller.cpp.
| void LegoCameraController::FUN_10012290 | ( | float | p_angle | ) |
Rotates the current camera transformation by a given angle around the Z axis.
[AI]
| p_angle | Angle in radians to rotate around Z. [AI] |
Restores backup matrix before applying new rotation to avoid cumulative drift. [AI]
Definition at line 129 of file legocameracontroller.cpp.
| void LegoCameraController::FUN_10012320 | ( | float | p_angle | ) |
Rotates the current camera transformation by a given angle around the Y axis.
[AI]
| p_angle | Angle in radians to rotate around Y. [AI] |
Restores backup matrix before applying new rotation to avoid cumulative drift. [AI]
Definition at line 137 of file legocameracontroller.cpp.
Retrieves the current point-of-view transformation into a matrix if it exists.
[AI]
| p_matrix | Reference to the destination Matrix4. [AI] |
Definition at line 144 of file legocameracontroller.cpp.
Sets the camera's transformation matrix in the 3D view, optionally applying a blend with the internal matrix.
[AI]
| p_transform | The new transformation matrix to use. [AI] |
| p_und | If true, a combined transform is computed with the current matrix; otherwise, p_transform is used as-is. [AI] |
Also updates the associated sound listener orientation to match the camera. [AI]
Definition at line 159 of file legocameracontroller.cpp.
| Mx3DPointFloat LegoCameraController::GetWorldDirection | ( | ) |
Gets the camera's world-space forward direction vector.
[AI]
Definition at line 215 of file legocameracontroller.cpp.
| Mx3DPointFloat LegoCameraController::GetWorldLocation | ( | ) |
Gets the camera's current world-space location.
[AI]
Definition at line 202 of file legocameracontroller.cpp.
| Mx3DPointFloat LegoCameraController::GetWorldUp | ( | ) |
Gets the camera's current world-space up vector.
[AI]
Definition at line 189 of file legocameracontroller.cpp.
|
inlineoverridevirtual |
Checks if the name is compatible with this type or its ancestors.
[AI]
| p_name | Name string to compare. [AI] |
Reimplemented from MxCore.
Definition at line 51 of file legocameracontroller.h.
Handles notifications for camera-relevant events (like mouse drag and mouse clicks).
[AI]
| p_param | Notification parameter. Casts to specific notification types as needed. [AI] |
This method dispatches notifications to appropriate event handlers (OnLButtonDown/Up, OnRButtonDown/Up, OnMouseMove) depending on the notification type and mouse button states. [AI]
Reimplemented from MxCore.
Definition at line 42 of file legocameracontroller.cpp.
|
virtual |
Called when the left mouse button is pressed at a screen point.
[AI]
| p_point | 2D point, typically window coordinates. [AI] |
Used to initiate camera interactions like dragging. [AI]
Definition at line 86 of file legocameracontroller.cpp.
|
virtual |
Called when the left mouse button is released at a screen point.
[AI]
| p_point | 2D point, typically window coordinates. [AI] |
Definition at line 92 of file legocameracontroller.cpp.
Called when the mouse is moved.
[AI]
| p_modifier | Modifier indicating which mouse buttons/states are active (bitmask from LegoEventNotificationParam). [AI] |
| p_point | 2D mouse position. [AI] |
Used to process camera rotation or movement during dragging. [AI]
Definition at line 110 of file legocameracontroller.cpp.
|
virtual |
Called when the right mouse button is pressed at a screen point.
[AI]
| p_point | 2D point, typically window coordinates. [AI] |
Definition at line 98 of file legocameracontroller.cpp.
|
virtual |
Called when the right mouse button is released at a screen point.
[AI]
| p_point | 2D point, typically window coordinates. [AI] |
Definition at line 104 of file legocameracontroller.cpp.
| void LegoCameraController::SetWorldTransform | ( | const Vector3 & | p_at, |
| const Vector3 & | p_dir, | ||
| const Vector3 & | p_up | ||
| ) |
Updates the camera's world transformation matrix using view reference parameters.
[AI]
| p_at | Camera position or 'at' vector. [AI] |
| p_dir | Camera forward direction. [AI] |
| p_up | Camera up vector. [AI] |
Computes the local transform matrix from position, direction, and up vector. Stores both original and working matrices. [AI]
Definition at line 121 of file legocameracontroller.cpp.