Isle
|
[AI] Represents a 3D rendering surface holding the main scene group and camera for rendering. More...
#include <legoview1.h>
Public Member Functions | |
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... | |
![]() | |
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... | |
Protected Member Functions | |
Tgl::View * | CreateView (Tgl::Renderer *pRenderer, Tgl::Device *pDevice) override |
[AI] Create and return the Tgl::View object for this surface. More... | |
![]() | |
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 rendering surface holding the main scene group and camera for rendering.
[AI] LegoView encapsulates a TglSurface, containing a Tgl::Group root scene node and an associated Tgl::Camera to define the scene's viewpoint and projection. It provides lifecycle and resource management (create/destroy), and gives access to the scene and camera for further manipulation or extension. [AI]
Definition at line 24 of file legoview1.h.
LegoView::LegoView | ( | ) |
[AI] Constructs an empty LegoView with uninitialized scene and camera.
Definition at line 30 of file legoview1.cpp.
|
override |
[AI] Destructor.
Ensures scene and camera are destroyed and released.
Definition at line 38 of file legoview1.cpp.
BOOL LegoView::Create | ( | const CreateStruct & | rCreateStruct, |
Tgl::Renderer * | pRenderer | ||
) |
[AI] Initialize the LegoView with a scene root and camera using the provided creation parameters and renderer.
rCreateStruct | [AI] Structure describing the view's creation parameters (e.g., resolution, view angle). [AI] |
pRenderer | [AI] Renderer used to create scene and camera objects and underlying TglSurface resources. [AI] |
Definition at line 45 of file legoview1.cpp.
|
overrideprotectedvirtual |
[AI] Create and return the Tgl::View object for this surface.
pRenderer | The rendering system used to instantiate the view. [AI] |
pDevice | The actual output device (window, surface, etc) for rendering. [AI] |
Implements TglSurface.
Definition at line 86 of file legoview1.cpp.
|
overridevirtual |
[AI] Release all scene and camera resources, call TglSurface cleanup.
[AI] This overrides TglSurface::Destroy to ensure scene root and camera are deleted and set to null before calling the parent's cleanup. [AI]
Reimplemented from TglSurface.
Reimplemented in LegoView1.
Definition at line 96 of file legoview1.cpp.
|
inline |
[AI] Accessor for the view's main camera.
Definition at line 84 of file legoview1.h.
|
inline |
[AI] Accessor for the root scene group.
Definition at line 79 of file legoview1.h.