Isle
|
[AI] Central class managing the LEGO Island 3D rendering subsystem. More...
#include <lego3dmanager.h>
Classes | |
struct | CreateStruct |
[AI] Construction parameters for initializing the 3D system. More... | |
Public Member Functions | |
Lego3DManager () | |
[AI] Constructs and initializes the Lego3DManager in an uninitialized state. More... | |
virtual | ~Lego3DManager () |
[AI] Destructor. More... | |
BOOL | Create (CreateStruct &rCreateStruct) |
[AI] Initializes the LEGO 3D system using the specified creation parameters. More... | |
void | Destroy () |
[AI] Cleans up the 3D system and destroys internal objects. More... | |
BOOL | Add (ViewROI &rROI) |
[AI] Adds a ViewROI (rendered object) to the scene. More... | |
BOOL | Remove (ViewROI &rROI) |
[AI] Removes a ViewROI from the scene. More... | |
BOOL | Moved (ViewROI &rROI) |
[AI] Notifies the manager that the ROI has moved and needs spatial update. More... | |
BOOL | SetPointOfView (ViewROI &rROI) |
[AI] Sets the camera's point of view to match the given ROI. More... | |
double | Render (double p_und) |
[AI] Renders the current frame. More... | |
int | SetFrustrum (float p_fov, float p_front, float p_back) |
[AI] Sets the 3D perspective frustum parameters for camera and view. More... | |
Tgl::Renderer * | GetRenderer () |
[AI] Provides access to the underlying Tgl::Renderer instance. More... | |
Tgl::Group * | GetScene () |
[AI] Returns the root Tgl::Group for the 3D scene. More... | |
Lego3DView * | GetLego3DView () |
[AI] Returns the encapsulated Lego3DView instance. More... | |
ViewLODListManager * | GetViewLODListManager () |
[AI] Returns the internal ViewLODListManager instance. More... | |
[AI] Central class managing the LEGO Island 3D rendering subsystem.
This manager is responsible for orchestrating rendering, scene composition, and related view and display options.
Internally, it aggregates the core rendering objects, scene views, and a manager for level-of-detail (LOD) lists. It provides interfaces to add/remove objects from the 3D scene, set the camera point of view, manipulate frustum parameters, and trigger rendering.
Ownership of created objects (Renderer, Lego3DView, ViewLODListManager) is managed here.
[AI] This class encapsulates the main 3D responsibilities for the LEGO Island game, delegating view-based logic to Lego3DView and rendering commands to Tgl::Renderer.
Definition at line 39 of file lego3dmanager.h.
Lego3DManager::Lego3DManager | ( | ) |
[AI] Constructs and initializes the Lego3DManager in an uninitialized state.
Definition at line 36 of file lego3dmanager.cpp.
|
virtual |
[AI] Destructor.
Calls Destroy() to clean up owned resources.
Definition at line 46 of file lego3dmanager.cpp.
[AI] Adds a ViewROI (rendered object) to the scene.
Delegates to Lego3DView. The ROI will be taken into account for rendering.
rROI | [AI] Reference to the ROI to add. |
Definition at line 198 of file lego3dmanager.h.
BOOL Lego3DManager::Create | ( | CreateStruct & | rCreateStruct | ) |
[AI] Initializes the LEGO 3D system using the specified creation parameters.
This sets up the Tgl::Renderer, Lego3DView, and ViewLODListManager. Must be called once before use.
rCreateStruct | [AI] Details the rendering window, buffers, and device settings. |
Definition at line 52 of file lego3dmanager.cpp.
void Lego3DManager::Destroy | ( | ) |
[AI] Cleans up the 3D system and destroys internal objects.
Frees the Renderer, View, and LOD Manager.
Definition at line 79 of file lego3dmanager.cpp.
|
inline |
[AI] Returns the encapsulated Lego3DView instance.
View handles detailed scene/camera logic and should be used for advanced manipulation.
Definition at line 242 of file lego3dmanager.h.
|
inline |
[AI] Provides access to the underlying Tgl::Renderer instance.
Use to submit lower-level rendering commands or queries.
Definition at line 229 of file lego3dmanager.h.
|
inline |
[AI] Returns the root Tgl::Group for the 3D scene.
This is the object tree containing all rendered geometry.
Definition at line 234 of file lego3dmanager.h.
|
inline |
[AI] Returns the internal ViewLODListManager instance.
Used for managing all LOD object lists within the 3D subsystem.
Definition at line 247 of file lego3dmanager.h.
[AI] Notifies the manager that the ROI has moved and needs spatial update.
Calls corresponding update on Lego3DView.
rROI | [AI] The ROI that has moved. |
Definition at line 222 of file lego3dmanager.h.
[AI] Removes a ViewROI from the scene.
Delegates to Lego3DView.
rROI | [AI] The ROI to remove. |
Definition at line 206 of file lego3dmanager.h.
double Lego3DManager::Render | ( | double | p_und | ) |
[AI] Renders the current frame.
Triggers drawing of the 3D scene. Accepts a parameter (purpose unclear, possibly frame time or LOD factor).
p_und | [AI] Unclear usage (likely time delta or update tick). |
Definition at line 92 of file lego3dmanager.cpp.
int Lego3DManager::SetFrustrum | ( | float | p_fov, |
float | p_front, | ||
float | p_back | ||
) |
[AI] Sets the 3D perspective frustum parameters for camera and view.
Updates field-of-view, near, and far plane distances used for rendering.
p_fov | [AI] Field of view in degrees |
p_front | [AI] Near clipping plane |
p_back | [AI] Far clipping plane |
Definition at line 101 of file lego3dmanager.cpp.
[AI] Sets the camera's point of view to match the given ROI.
Delegates to Lego3DView, which applies the transformation.
rROI | [AI] The ROI serving as the new point of view. |
Definition at line 214 of file lego3dmanager.h.