Isle
Loading...
Searching...
No Matches
legopointofviewcontroller.h
Go to the documentation of this file.
1#ifndef LEGOPOINTOFVIEWCONTROLLER_H
2#define LEGOPOINTOFVIEWCONTROLLER_H
3
4#include "decomp.h"
5#include "mxcore.h"
6#include "mxgeometry.h"
7
8#include <windows.h>
9
10class Lego3DView;
11class LegoEntity;
13
15//
16// LegoMouseController
17
18// VTABLE: LEGO1 0x100d8dd8
19// SIZE 0x20
27public:
29 ~LegoMouseController() override;
30
36 virtual void LeftDown(int, int); // vtable+0x14
37
43 virtual void LeftDrag(int, int); // vtable+0x18
44
50 virtual void LeftUp(int, int); // vtable+0x1c
51
57 virtual void RightDown(int, int); // vtable+0x20
58
64 virtual void RightDrag(int, int); // vtable+0x24
65
71 virtual void RightUp(int, int); // vtable+0x28
72
76 BOOL GetIsButtonDown() { return m_isButtonDown; }
77
81 MxDouble GetButtonX() { return m_buttonX; }
82
86 MxDouble GetButtonY() { return m_buttonY; }
87
88private:
89 BOOL m_isButtonDown;
90 undefined4 m_unk0x0c;
91 MxDouble m_buttonX;
92 MxDouble m_buttonY;
93};
94
95// SYNTHETIC: LEGO1 0x100655b0
96// LegoMouseController::`scalar deleting destructor'
97
98// VTABLE: LEGO1 0x100d8e08
99// SIZE 0x38
107public:
109 ~LegoPointOfViewController() override;
110
115 MxResult Tickle() override; // vtable+0x08
116
122 void LeftDown(int p_x, int p_y) override; // vtable+0x0c
123
129 void LeftDrag(int p_x, int p_y) override; // vtable+0x10
130
136 void LeftUp(int p_x, int p_y) override
137 {
140 }
141 // vtable+0x14
142
148 void RightDown(int p_x, int p_y) override
149 {
152 }
153 // vtable+0x20
154
160 void RightDrag(int p_x, int p_y) override
161 {
164 }
165 // vtable+0x24
166
172 void RightUp(int p_x, int p_y) override
173 {
176 } // vtable+0x28
177
182 virtual void SetEntity(LegoEntity* p_entity); // vtable+0x2c
183
189 MxResult Create(Lego3DView* p_lego3DView);
190
196 void OnViewSize(int p_width, int p_height);
197
202
207
208protected:
212 void AffectPointOfView();
213
218};
219
220// SYNTHETIC: LEGO1 0x10065750
221// LegoPointOfViewController::`scalar deleting destructor'
222
223#endif /* LEGOPOINTOFVIEWCONTROLLER_H */
[AI] Represents a 3D view for rendering and managing LEGO game objects in a 3D scene.
Definition: lego3dview.h:20
[AI] Represents an entity that can be placed and managed in the LEGO Island world.
Definition: legoentity.h:16
[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.
Definition: mxcore.h:15
unsigned int undefined4
Definition: decomp.h:28
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
MxLong MxResult
[AI]
Definition: mxtypes.h:106
double MxDouble
[AI]
Definition: mxtypes.h:74