|
Isle
|
[AI] Represents a 3D view for rendering and managing LEGO game objects in a 3D scene. More...
#include <lego3dview.h>


Public Member Functions | |
| Lego3DView () | |
| [AI] Constructs a new Lego3DView instance. More... | |
| ~Lego3DView () override | |
| [AI] Destroys the Lego3DView instance and all associated resources via Destroy(). More... | |
| BOOL | Create (const CreateStruct &rCreateStruct, Tgl::Renderer *pRenderer) |
| [AI] Initializes the 3D view with the specified surface creation parameters and renderer interface. More... | |
| void | Destroy () override |
| [AI] Cleans up resources allocated by the view, including the ViewManager, unset the point of view, and calls the parent Destroy(). More... | |
| BOOL | Add (ViewROI &rROI) |
| [AI] Adds a ViewROI (renderable object instance) to the scene. More... | |
| BOOL | Remove (ViewROI &rROI) |
| [AI] Removes a ViewROI from the scene. More... | |
| BOOL | Moved (ViewROI &rROI) |
| [AI] Notifies the view that a ViewROI has moved. More... | |
| BOOL | SetPointOfView (ViewROI &rROI) |
| [AI] Sets the current point of view to the specified ViewROI and updates the camera transformation. More... | |
| double | Render (double p_und) |
| [AI] Renders the scene using the ViewManager and returns the render time. More... | |
| ViewROI * | Pick (unsigned long x, unsigned long y) |
| [AI] Picks (selects) a ViewROI in the scene by screen-space coordinates. More... | |
| ViewROI * | GetPointOfView () |
| [AI] Returns the current point-of-view object (the ViewROI the camera is following). More... | |
| ViewManager * | GetViewManager () |
| [AI] Returns the ViewManager responsible for managing scene objects and transformations. More... | |
Public Member Functions inherited from LegoView1 | |
| LegoView1 () | |
| [AI] Constructs the view and zeros out all light pointers (sun, directional, ambient). More... | |
| ~LegoView1 () override | |
| [AI] Destructor. More... | |
| BOOL | AddLightsToViewport () |
| [AI] Adds the view's lights (sun, directional, ambient) to the active Tgl view for rendering. More... | |
| BOOL | Create (const TglSurface::CreateStruct &rCreateStruct, Tgl::Renderer *pRenderer) |
| [AI] Initializes scene, camera, and three types of lights (sun, directional, ambient) using supplied renderer. More... | |
| void | Destroy () override |
| [AI] Safely removes all lights from the scene, deletes them, and nulls pointers. More... | |
| void | SetLightTransform (BOOL bDirectionalLight, Tgl::FloatMatrix4 &rMatrix) |
| [AI] Sets the transformation matrix (position/orientation) for either the sun or directional light. More... | |
| void | SetLightColor (BOOL bDirectionalLight, float red, float green, float blue) |
| [AI] Sets the RGB color for either the sun or directional light. More... | |
Public Member Functions inherited from LegoView | |
| LegoView () | |
| [AI] Constructs an empty LegoView with uninitialized scene and camera. More... | |
| ~LegoView () override | |
| [AI] Destructor. More... | |
| BOOL | Create (const CreateStruct &rCreateStruct, Tgl::Renderer *pRenderer) |
| [AI] Initialize the LegoView with a scene root and camera using the provided creation parameters and renderer. More... | |
| void | Destroy () override |
| [AI] Release all scene and camera resources, call TglSurface cleanup. More... | |
| Tgl::Group * | GetScene () const |
| [AI] Accessor for the root scene group. More... | |
| Tgl::Camera * | GetCamera () const |
| [AI] Accessor for the view's main camera. More... | |
Public Member Functions inherited from TglSurface | |
| TglSurface () | |
| [AI] Constructs a new TglSurface instance with members initialized to their default state. More... | |
| virtual | ~TglSurface () |
| [AI] Virtual destructor also triggers Destroy(). More... | |
| virtual BOOL | Create (const CreateStruct &, Tgl::Renderer *, Tgl::Group *pScene) |
| [AI] Creates and initializes the surface, rendering device, and optionally installs scene graph. More... | |
| virtual void | Destroy () |
| [AI] Destroys all resources (view, device), releasing scene and renderer references. More... | |
| virtual double | Render () |
| [AI] Renders a single frame and returns the render time for that frame. More... | |
| Tgl::Renderer * | GetRenderer () const |
| [AI] Gets the active renderer for this surface. More... | |
| Tgl::Device * | GetDevice () const |
| [AI] Returns the graphics device used by this surface, e.g. More... | |
| Tgl::View * | GetView () const |
| [AI] Gets the current view/camera for this surface. More... | |
| Tgl::Group * | GetScene () const |
| [AI] Returns the currently attached 3D scene root/group. More... | |
| unsigned long | GetWidth () const |
| [AI] Returns the width (in pixels) of the rendered surface. More... | |
| unsigned long | GetHeight () const |
| [AI] Returns the height (in pixels) of the rendered surface. More... | |
| double | GetRenderingRate () const |
| [AI] Returns the measured rendering rate (frames per second) for the rendering routine. More... | |
| double | GetFrameRate () const |
| [AI] Returns the measured frame rate (frames per second) for the current surface. More... | |
| unsigned long | GetFrameCount () const |
| [AI] Returns the frame count since creation or since last meter reset. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LegoView | |
| Tgl::View * | CreateView (Tgl::Renderer *pRenderer, Tgl::Device *pDevice) override |
| [AI] Create and return the Tgl::View object for this surface. More... | |
Protected Member Functions inherited from TglSurface | |
| virtual Tgl::View * | CreateView (Tgl::Renderer *, Tgl::Device *)=0 |
| [AI] Abstract view creation. More... | |
| virtual void | DestroyView () |
| [AI] Destroys (deletes) the surface's view/camera, and resets the pointer to null. More... | |
[AI] Represents a 3D view for rendering and managing LEGO game objects in a 3D scene.
Inherits from LegoView1 and acts as the main render target for 3D objects, handling the addition and removal of objects, point of view management, and rendering logic. Utilizes a ViewManager to coordinate the scene and camera. [AI]
Definition at line 20 of file lego3dview.h.
| Lego3DView::Lego3DView | ( | ) |
[AI] Constructs a new Lego3DView instance.
Definition at line 14 of file lego3dview.cpp.
|
override |
[AI] Destroys the Lego3DView instance and all associated resources via Destroy().
Definition at line 23 of file lego3dview.cpp.
[AI] Adds a ViewROI (renderable object instance) to the scene.
Forwards to ViewManager::Add().
| rROI | Reference to the ViewROI to be added. |
Definition at line 78 of file lego3dview.cpp.
| BOOL Lego3DView::Create | ( | const CreateStruct & | rCreateStruct, |
| Tgl::Renderer * | pRenderer | ||
| ) |
[AI] Initializes the 3D view with the specified surface creation parameters and renderer interface.
Initializes the underlying rendering view, sets up the viewing frustum and constructs the ViewManager for scene management.
| rCreateStruct | Struct containing properties for initialization, including view angle. |
| pRenderer | Renderer interface used for low-level rendering context creation. |
Definition at line 29 of file lego3dview.cpp.
|
overridevirtual |
[AI] Cleans up resources allocated by the view, including the ViewManager, unset the point of view, and calls the parent Destroy().
[AI]
Reimplemented from TglSurface.
Definition at line 63 of file lego3dview.cpp.
|
inline |
[AI] Returns the current point-of-view object (the ViewROI the camera is following).
[AI] Returns the current point-of-view object (the ViewROI the camera is following). [AI]
[AI]
[AI] [AI]
Definition at line 162 of file lego3dview.h.
|
inline |
[AI] Returns the ViewManager responsible for managing scene objects and transformations.
[AI] Returns the ViewManager responsible for managing scene objects and transformations. [AI]
[AI]
[AI] [AI]
Definition at line 154 of file lego3dview.h.
[AI] Notifies the view that a ViewROI has moved.
If the moved object is the current point of view, updates the camera transformation to match the object's transformation.
| rROI | The ViewROI that moved. |
Definition at line 126 of file lego3dview.cpp.
| ViewROI * Lego3DView::Pick | ( | unsigned long | x, |
| unsigned long | y | ||
| ) |
[AI] Picks (selects) a ViewROI in the scene by screen-space coordinates.
Uses ViewManager's picking logic.
| x | The horizontal screen coordinate. |
| y | The vertical screen coordinate. |
Definition at line 157 of file lego3dview.cpp.
[AI] Removes a ViewROI from the scene.
Forwards to ViewManager::Remove(). If the ViewROI is the current point of view, it resets the POV.
| rROI | Reference to the ViewROI to remove. |
Definition at line 89 of file lego3dview.cpp.
| double Lego3DView::Render | ( | double | p_und | ) |
[AI] Renders the scene using the ViewManager and returns the render time.
Calls ViewManager::Update() and then base surface Render().
| p_und | Elapsed time or time delta since last render, for frame update logic. |
Definition at line 148 of file lego3dview.cpp.
[AI] Sets the current point of view to the specified ViewROI and updates the camera transformation.
Updates the ViewManager's POV source as well.
| rROI | The ViewROI to use as the new point of view. |
Definition at line 105 of file lego3dview.cpp.