1#ifndef LEGOPOINTOFVIEWCONTROLLER_H
2#define LEGOPOINTOFVIEWCONTROLLER_H
50 virtual void LeftUp(
int,
int);
122 void LeftDown(
int p_x,
int p_y)
override;
129 void LeftDrag(
int p_x,
int p_y)
override;
[AI] Represents a 3D view for rendering and managing LEGO game objects in a 3D scene.
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
[AI] Handles mouse input relevant to camera or entity control.
virtual void RightUp(int, int)
[AI] Invoked when the right mouse button is released.
MxDouble GetButtonY()
[AI] Returns the Y coordinate where the last mouse button event occurred.
virtual void LeftUp(int, int)
[AI] Invoked when the left mouse button is released.
virtual void LeftDrag(int, int)
[AI] Invoked as the mouse drags while the left button is held.
BOOL GetIsButtonDown()
[AI] Returns whether any mouse button is currently in the 'down' state.
virtual void RightDrag(int, int)
[AI] Invoked as the mouse drags while the right button is held.
virtual void RightDown(int, int)
[AI] Invoked when the right mouse button is pressed.
virtual void LeftDown(int, int)
[AI] Invoked when the left mouse button is pressed.
LegoMouseController()
[AI] Constructor initializing state of mouse button. [AI]
MxDouble GetButtonX()
[AI] Returns the X coordinate where the last mouse button event occurred.
~LegoMouseController() override
[AI] Destructor for mouse controller. [AI]
[AI] Handles user navigation input (keyboard and joystick) and determines avatar movement and directi...
[AI] Controller that links mouse actions to manipulation of the user's point of view in the 3D scene.
virtual void SetEntity(LegoEntity *p_entity)
[AI] Assign the entity which this controller operates on, typically to associate the point of view wi...
LegoNavController * GetNavController()
[AI] Accessor for the navigation controller associated with this point-of-view controller.
LegoPointOfViewController()
[AI] Initializes state for coordinating mouse and point-of-view. [AI]
~LegoPointOfViewController() override
[AI] Destructor; cleans up any owned references. [AI]
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.
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.
LegoNavController * m_nav
[AI] Navigation controller used to translate input to navigation/camera changes. [AI]
LegoEntity * m_entity
[AI] The entity whose point of view this controller manipulates. [AI]
LegoEntity * GetEntity()
[AI] Accessor for the currently attached entity.
void AffectPointOfView()
[AI] Internal method to compute and apply the effect of user mouse input on the current point of view...
void LeftDown(int p_x, int p_y) override
[AI] Called when left mouse button is pressed; may start point-of-view manipulation.
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/...
MxResult Tickle() override
[AI] Called each frame (tick) to update the state of the point of view, potentially responding to inp...
MxDouble m_entityOffsetUp
[AI] Offset along the entity's upward vector (for perspective/camera alignment). [AI]
MxResult Create(Lego3DView *p_lego3DView)
[AI] Initializes the controller with a specific 3D view.
Lego3DView * m_lego3DView
[AI] The active 3D view that input actions are translated into. [AI]
void RightDown(int p_x, int p_y) override
[AI] Called when the right mouse button is pressed; often used for alternative camera controls.
void RightUp(int p_x, int p_y) override
[AI] Called when the right mouse button is released, possibly to finalize alternative camera/entity a...
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...
[AI] Base virtual class for all Mindscape engine (Mx) objects.