Isle
Loading...
Searching...
No Matches
lego3dmanager.h
Go to the documentation of this file.
1#ifndef _Lego3DManager_h
2#define _Lego3DManager_h
3
4#include "assert.h"
5#include "lego3dview.h"
6
7namespace Tgl
8{
9class Renderer;
10class Group;
11} // namespace Tgl
12
13class ViewROI;
14
15// ??? for now
17
19//
20// Lego3DManager
21
22// VTABLE: LEGO1 0x100dbfa4
23// SIZE 0x10
40public:
45 struct CreateStruct {
46 const GUID* m_pDriverGUID;
47 HWND m_hWnd;
48 IDirectDraw* m_pDirectDraw;
49 IDirectDrawSurface* m_pFrontBuffer;
50 IDirectDrawSurface* m_pBackBuffer;
51 IDirectDrawPalette* m_pPalette;
54 IDirect3D2* m_direct3d;
55 IDirect3DDevice2* m_d3dDevice;
56 };
57
58public:
63
67 virtual ~Lego3DManager();
68
77 BOOL Create(CreateStruct& rCreateStruct);
78
84 void Destroy();
85
94 BOOL Add(ViewROI& rROI);
95
104 BOOL Remove(ViewROI& rROI);
105
114 BOOL Moved(ViewROI& rROI);
115
125
134 double Render(double p_und);
135
146 int SetFrustrum(float p_fov, float p_front, float p_back);
147
156
165
174
183
184 // SYNTHETIC: LEGO1 0x100ab340
185 // Lego3DManager::`scalar deleting destructor'
186
187private:
188 Tgl::Renderer* m_pRenderer;
189 Lego3DView* m_pLego3DView;
190 ViewLODListManager* m_pViewLODListManager;
191};
192
194//
195// Lego3DManager implementaion
196
197// FUNCTION: BETA10 0x10079bd0
199{
200 assert(m_pLego3DView);
201
202 return m_pLego3DView->Add(rROI);
203}
204
205// FUNCTION: BETA10 0x10037430
207{
208 assert(m_pLego3DView);
209
210 return m_pLego3DView->Remove(rROI);
211}
212
213// FUNCTION: BETA10 0x100d8990
215{
216 assert(m_pLego3DView);
217
218 return m_pLego3DView->SetPointOfView(rROI);
219}
220
221// FUNCTION: BETA10 0x1004af70
223{
224 assert(m_pLego3DView);
225
226 return m_pLego3DView->Moved(rROI);
227}
228
230{
231 return m_pRenderer;
232}
233
235{
236 assert(m_pLego3DView);
237
238 return m_pLego3DView->GetScene();
239}
240
241// FUNCTION: BETA10 0x10011840
243{
244 return m_pLego3DView;
245}
246
248{
249 return m_pViewLODListManager;
250}
251
252#endif /* _Lego3DManager_h */
[AI] Central class managing the LEGO Island 3D rendering subsystem.
Definition: lego3dmanager.h:39
BOOL Create(CreateStruct &rCreateStruct)
[AI] Initializes the LEGO 3D system using the specified creation parameters.
Tgl::Renderer * GetRenderer()
[AI] Provides access to the underlying Tgl::Renderer instance.
int SetFrustrum(float p_fov, float p_front, float p_back)
[AI] Sets the 3D perspective frustum parameters for camera and view.
void Destroy()
[AI] Cleans up the 3D system and destroys internal objects.
Lego3DManager()
[AI] Constructs and initializes the Lego3DManager in an uninitialized state.
BOOL Moved(ViewROI &rROI)
[AI] Notifies the manager that the ROI has moved and needs spatial update.
Tgl::Group * GetScene()
[AI] Returns the root Tgl::Group for the 3D scene.
BOOL Add(ViewROI &rROI)
[AI] Adds a ViewROI (rendered object) to the scene.
ViewLODListManager * GetViewLODListManager()
[AI] Returns the internal ViewLODListManager instance.
double Render(double p_und)
[AI] Renders the current frame.
Lego3DView * GetLego3DView()
[AI] Returns the encapsulated Lego3DView instance.
BOOL Remove(ViewROI &rROI)
[AI] Removes a ViewROI from the scene.
BOOL SetPointOfView(ViewROI &rROI)
[AI] Sets the camera's point of view to match the given ROI.
virtual ~Lego3DManager()
[AI] Destructor.
[AI] Represents a 3D view for rendering and managing LEGO game objects in a 3D scene.
Definition: lego3dview.h:20
BOOL Add(ViewROI &rROI)
[AI] Adds a ViewROI (renderable object instance) to the scene.
Definition: lego3dview.cpp:78
BOOL SetPointOfView(ViewROI &rROI)
[AI] Sets the current point of view to the specified ViewROI and updates the camera transformation.
Definition: lego3dview.cpp:105
BOOL Moved(ViewROI &rROI)
[AI] Notifies the view that a ViewROI has moved.
Definition: lego3dview.cpp:126
BOOL Remove(ViewROI &rROI)
[AI] Removes a ViewROI from the scene.
Definition: lego3dview.cpp:89
Tgl::Group * GetScene() const
[AI] Accessor for the root scene group.
Definition: legoview1.h:79
[AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups...
Definition: tgl.h:669
[AI] Main interface/factory for rendering resources and scene graphs.
Definition: tgl.h:188
[AI] Manages the lifecycle, lookup, and sharing of ViewLODList instances for different ROI names.
Definition: viewlodlist.h:111
[AI] ViewROI objects represent viewable and placeable objects in the scene, each holding their own tr...
Definition: viewroi.h:13
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine.
[AI] Construction parameters for initializing the 3D system.
Definition: lego3dmanager.h:45
IDirectDrawSurface * m_pFrontBuffer
[AI] DirectDraw front buffer surface
Definition: lego3dmanager.h:49
IDirect3D2 * m_direct3d
[AI] Direct3D interface
Definition: lego3dmanager.h:54
IDirectDrawPalette * m_pPalette
[AI] Color palette for indexed display modes
Definition: lego3dmanager.h:51
IDirect3DDevice2 * m_d3dDevice
[AI] Direct3D device to use for rendering
Definition: lego3dmanager.h:55
HWND m_hWnd
[AI] Window handle to associate DirectDraw surfaces with
Definition: lego3dmanager.h:47
IDirectDrawSurface * m_pBackBuffer
[AI] DirectDraw back buffer surface
Definition: lego3dmanager.h:50
const GUID * m_pDriverGUID
[AI] Pointer to DirectDraw driver GUID to use (NULL for default)
Definition: lego3dmanager.h:46
IDirectDraw * m_pDirectDraw
[AI] Pointer to active DirectDraw interface
Definition: lego3dmanager.h:48
BOOL m_isFullScreen
[AI] TRUE if 3D system should run in full-screen mode
Definition: lego3dmanager.h:52
BOOL m_isWideViewAngle
[AI] TRUE for wide-angle (FOV) projection
Definition: lego3dmanager.h:53