Isle
Loading...
Searching...
No Matches
Tgl::View Class Referenceabstract

[AI] Represents a rendering viewport and drawing context. More...

#include <tgl.h>

Inheritance diagram for Tgl::View:
Collaboration diagram for Tgl::View:

Public Member Functions

virtual Result Add (const Light *)=0
 [AI] Adds a light to the view for rendering. More...
 
virtual Result Remove (const Light *)=0
 [AI] Removes a light from the view. More...
 
virtual Result SetCamera (const Camera *)=0
 [AI] Sets the camera used by the view. More...
 
virtual Result SetProjection (ProjectionType)=0
 [AI] Sets projection type for the view (e.g., perspective/orthographic). More...
 
virtual Result SetFrustrum (float frontClippingDistance, float backClippingDistance, float degrees)=0
 [AI] Sets front and back clipping planes and view field in degrees. More...
 
virtual Result SetBackgroundColor (float r, float g, float b)=0
 [AI] Sets the background color for the view. More...
 
virtual Result GetBackgroundColor (float *r, float *g, float *b)=0
 [AI] Retrieves the current background color. More...
 
virtual Result Clear ()=0
 [AI] Clears the current contents of the view. More...
 
virtual Result Render (const Group *)=0
 [AI] Renders a group hierarchy to the view. More...
 
virtual Result ForceUpdate (unsigned long x, unsigned long y, unsigned long width, unsigned long height)=0
 [AI] Forces update/redraw of a region in the view. More...
 
virtual Result TransformWorldToScreen (const float world[3], float screen[4])=0
 [AI] Transforms a world-space position to screen coordinates. More...
 
virtual Result TransformScreenToWorld (const float screen[4], float world[3])=0
 [AI] Converts screen coordinate back to world position. More...
 
virtual Result Pick (unsigned long x, unsigned long y, const Group **ppGroupsToPickFrom, int groupsToPickFromCount, const Group **&rppPickedGroups, int &rPickedGroupCount)=0
 [AI] Picks the group under screen coordinates, searching specific group trees. More...
 
- Public Member Functions inherited from Tgl::Object
virtual ~Object ()
 [AI] Destructor; releases resources. More...
 
virtual void * ImplementationDataPtr ()=0
 [AI] Returns a pointer to internal/implementation data, if any. More...
 

Detailed Description

[AI] Represents a rendering viewport and drawing context.

[AI]

[AI] Manages camera, lights, projection parameters, picking, and frame rendering. [AI]

Definition at line 397 of file tgl.h.

Member Function Documentation

◆ Add()

virtual Result Tgl::View::Add ( const Light )
pure virtual

[AI] Adds a light to the view for rendering.

[AI]

Parameters
lightLight to add. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ Clear()

virtual Result Tgl::View::Clear ( )
pure virtual

[AI] Clears the current contents of the view.

[AI]

Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ ForceUpdate()

virtual Result Tgl::View::ForceUpdate ( unsigned long  x,
unsigned long  y,
unsigned long  width,
unsigned long  height 
)
pure virtual

[AI] Forces update/redraw of a region in the view.

[AI]

Parameters
xLeft of update region. [AI]
yTop of update region. [AI]
widthWidth of region. [AI]
heightHeight of region. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ GetBackgroundColor()

virtual Result Tgl::View::GetBackgroundColor ( float *  r,
float *  g,
float *  b 
)
pure virtual

[AI] Retrieves the current background color.

[AI]

Parameters
rPointer to red value. [AI]
gPointer to green value. [AI]
bPointer to blue value. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ Pick()

virtual Result Tgl::View::Pick ( unsigned long  x,
unsigned long  y,
const Group **  ppGroupsToPickFrom,
int  groupsToPickFromCount,
const Group **&  rppPickedGroups,
int &  rPickedGroupCount 
)
pure virtual

[AI] Picks the group under screen coordinates, searching specific group trees.

[AI]

Parameters
xX coordinate (view coords). [AI]
yY coordinate (view coords). [AI]
ppGroupsToPickFromArray of candidate groups to test for picking. [AI]
groupsToPickFromCountNumber of candidate groups. [AI]
rppPickedGroupsOutput array; hierarchy from root to leaf group picked (may contain nullptr for misses). [AI]
rPickedGroupCountOutput; number of elements in rppPickedGroups. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ Remove()

virtual Result Tgl::View::Remove ( const Light )
pure virtual

[AI] Removes a light from the view.

[AI]

Parameters
lightLight to remove. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ Render()

virtual Result Tgl::View::Render ( const Group )
pure virtual

[AI] Renders a group hierarchy to the view.

[AI]

Parameters
groupScene/group to render. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ SetBackgroundColor()

virtual Result Tgl::View::SetBackgroundColor ( float  r,
float  g,
float  b 
)
pure virtual

[AI] Sets the background color for the view.

[AI]

Parameters
rRed. [AI]
gGreen. [AI]
bBlue. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ SetCamera()

virtual Result Tgl::View::SetCamera ( const Camera )
pure virtual

[AI] Sets the camera used by the view.

[AI]

Parameters
cameraCamera to use for rendering. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ SetFrustrum()

virtual Result Tgl::View::SetFrustrum ( float  frontClippingDistance,
float  backClippingDistance,
float  degrees 
)
pure virtual

[AI] Sets front and back clipping planes and view field in degrees.

[AI]

Parameters
frontClippingDistanceNear/far plane distances and field of view (degrees). [AI]
backClippingDistance[AI]
degrees[AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ SetProjection()

virtual Result Tgl::View::SetProjection ( ProjectionType  )
pure virtual

[AI] Sets projection type for the view (e.g., perspective/orthographic).

[AI]

Parameters
pTypeProjection type. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ TransformScreenToWorld()

virtual Result Tgl::View::TransformScreenToWorld ( const float  screen[4],
float  world[3] 
)
pure virtual

[AI] Converts screen coordinate back to world position.

[AI]

Parameters
screenInput [x,y,z,w] in screen space. [AI]
worldOutput [x,y,z] in world space. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.

◆ TransformWorldToScreen()

virtual Result Tgl::View::TransformWorldToScreen ( const float  world[3],
float  screen[4] 
)
pure virtual

[AI] Transforms a world-space position to screen coordinates.

[AI]

Parameters
worldInput [x,y,z] position in world coordinates. [AI]
screenOutput [x,y,z,1/w] in screen space. [AI]
Returns
Result Success or Error. [AI]

Implemented in TglImpl::ViewImpl.


The documentation for this class was generated from the following file: