Isle
Loading...
Searching...
No Matches
legoview1.h
Go to the documentation of this file.
1#ifndef _LegoView1_h
2#define _LegoView1_h
3
4#include "compat.h"
5#include "decomp.h"
6#include "tglsurface.h"
7
8namespace Tgl
9{
10class Camera;
11class Light;
12} // namespace Tgl
13
15// LegoView
16
21// VTABLE: LEGO1 0x100dc000
22// VTABLE: BETA10 0x101c3578
23// SIZE 0x78
24class LegoView : public TglSurface {
25public:
29 LegoView();
30
34 ~LegoView() override;
35
42 BOOL Create(const CreateStruct& rCreateStruct, Tgl::Renderer* pRenderer);
43
48 void Destroy() override; // vtable+0x08
49
54 Tgl::Group* GetScene() const;
55
60 Tgl::Camera* GetCamera() const;
61
62protected:
69 Tgl::View* CreateView(Tgl::Renderer* pRenderer, Tgl::Device* pDevice) override; // vtable+0x10
70
71private:
72 Tgl::Group* m_pScene;
73 Tgl::Camera* m_pCamera;
74};
75
77// LegoView implementation
78
80{
81 return m_pScene;
82}
83
85{
86 return m_pCamera;
87}
88
89// SYNTHETIC: LEGO1 0x100ab580
90// SYNTHETIC: BETA10 0x1017cb80
91// LegoView::`scalar deleting destructor'
92
94// LegoView1
95
102// VTABLE: LEGO1 0x100dc018
103// VTABLE: BETA10 0x101c3590
104// SIZE 0x88
105class LegoView1 : public LegoView {
106public:
110 LegoView1();
111
115 ~LegoView1() override;
116
123
130 BOOL Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Renderer* pRenderer);
131
136 void Destroy() override; // vtable+0x08
137
143 void SetLightTransform(BOOL bDirectionalLight, Tgl::FloatMatrix4& rMatrix);
144
152 void SetLightColor(BOOL bDirectionalLight, float red, float green, float blue);
153
154private:
160 void SetLightTransform(Tgl::Light* pLight, Tgl::FloatMatrix4& rMatrix);
161
169 void SetLightColor(Tgl::Light* pLight, float red, float green, float blue);
170
171 Tgl::Light* m_pSunLight;
172 Tgl::Light* m_pDirectionalLight;
173 Tgl::Light* m_pAmbientLight;
174};
175
176// SYNTHETIC: LEGO1 0x100ab7a0
177// SYNTHETIC: BETA10 0x1017cc00
178// LegoView1::`scalar deleting destructor'
179
180#endif /* _LegoView1_h */
[AI] 3D view that supports advanced lighting for scene rendering.
Definition: legoview1.h:105
~LegoView1() override
[AI] Destructor.
Definition: legoview1.cpp:121
void Destroy() override
[AI] Safely removes all lights from the scene, deletes them, and nulls pointers.
Definition: legoview1.cpp:175
void SetLightTransform(BOOL bDirectionalLight, Tgl::FloatMatrix4 &rMatrix)
[AI] Sets the transformation matrix (position/orientation) for either the sun or directional light.
Definition: legoview1.cpp:200
BOOL AddLightsToViewport()
[AI] Adds the view's lights (sun, directional, ambient) to the active Tgl view for rendering.
Definition: legoview1.cpp:128
BOOL Create(const TglSurface::CreateStruct &rCreateStruct, Tgl::Renderer *pRenderer)
[AI] Initializes scene, camera, and three types of lights (sun, directional, ambient) using supplied ...
Definition: legoview1.cpp:139
void SetLightColor(BOOL bDirectionalLight, float red, float green, float blue)
[AI] Sets the RGB color for either the sun or directional light.
Definition: legoview1.cpp:223
LegoView1()
[AI] Constructs the view and zeros out all light pointers (sun, directional, ambient).
Definition: legoview1.cpp:112
[AI] Represents a 3D rendering surface holding the main scene group and camera for rendering.
Definition: legoview1.h:24
LegoView()
[AI] Constructs an empty LegoView with uninitialized scene and camera.
Definition: legoview1.cpp:30
~LegoView() override
[AI] Destructor.
Definition: legoview1.cpp:38
Tgl::Group * GetScene() const
[AI] Accessor for the root scene group.
Definition: legoview1.h:79
Tgl::View * CreateView(Tgl::Renderer *pRenderer, Tgl::Device *pDevice) override
[AI] Create and return the Tgl::View object for this surface.
Definition: legoview1.cpp:86
BOOL Create(const CreateStruct &rCreateStruct, Tgl::Renderer *pRenderer)
[AI] Initialize the LegoView with a scene root and camera using the provided creation parameters and ...
Definition: legoview1.cpp:45
void Destroy() override
[AI] Release all scene and camera resources, call TglSurface cleanup.
Definition: legoview1.cpp:96
Tgl::Camera * GetCamera() const
[AI] Accessor for the view's main camera.
Definition: legoview1.h:84
[AI] Encapsulates a rendering surface, its associated hardware device, renderer, and view.
Definition: tglsurface.h:32
[AI] Represents a viewpoint in the 3D scene.
Definition: tgl.h:531
[AI] Represents a rendering device/context for the Tgl renderer.
Definition: tgl.h:318
[AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups...
Definition: tgl.h:669
[AI] Represents a source of lighting in the 3D scene.
Definition: tgl.h:559
[AI] Main interface/factory for rendering resources and scene graphs.
Definition: tgl.h:188
[AI] Represents a rendering viewport and drawing context.
Definition: tgl.h:397
typedef BOOL(FAR PASCAL *LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA
[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine.
float FloatMatrix4[4][4]
[AI] Represents a 4x4 matrix of single-precision floating point values.
Definition: tglvector.h:53
[AI] Contains initialization parameters for creating a TglSurface and its underlying DDraw/D3D resour...
Definition: tglsurface.h:40