Isle
Loading...
Searching...
No Matches
Tgl Namespace Reference

[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine. More...

Namespaces

namespace  Constant
 

Classes

class  Camera
 [AI] Represents a viewpoint in the 3D scene. More...
 
class  Device
 [AI] Represents a rendering device/context for the Tgl renderer. More...
 
struct  DeviceDirect3DCreateData
 [AI] Contains Direct3D-specific data needed to create a rendering device. More...
 
struct  DeviceDirectDrawCreateData
 [AI] Contains DirectDraw-specific params for creating a rendering device. More...
 
class  Group
 [AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups. More...
 
class  Light
 [AI] Represents a source of lighting in the 3D scene. More...
 
class  Mesh
 [AI] Represents a renderable 3D mesh. More...
 
class  MeshBuilder
 [AI] Builder class for assembling mesh data and extracting mesh objects. More...
 
class  Object
 [AI] Utility for mesh data construction and conversion. [AI] More...
 
struct  PaletteEntry
 [AI] Represents a single color entry in a palette. More...
 
class  Renderer
 [AI] Main interface/factory for rendering resources and scene graphs. More...
 
class  Texture
 [AI] Represents a GPU or system memory texture for use in rendering. More...
 
class  View
 [AI] Represents a rendering viewport and drawing context. More...
 

Typedefs

typedef float FloatMatrix4[4][4]
 [AI] Represents a 4x4 matrix of single-precision floating point values. More...
 

Enumerations

enum  ColorModel { Ramp , RGB }
 [AI] Represents available color models for rendering. More...
 
enum  ShadingModel {
  Wireframe , UnlitFlat , Flat , Gouraud ,
  Phong
}
 [AI] Represents shading models available for rendering geometry. More...
 
enum  LightType {
  Ambient , Point , Spot , Directional ,
  ParallelPoint
}
 [AI] Types of lights supported in the renderer. More...
 
enum  ProjectionType { Perspective , Orthographic }
 [AI] Projection modes for camera/view transforms. More...
 
enum  TextureMappingMode { Linear , PerspectiveCorrect }
 [AI] Methods for mapping textures onto geometry. More...
 
enum  MaterialMode { FromParent , FromFrame , FromMesh }
 [AI] Determines how material properties are sourced for a group/mesh. More...
 
enum  Result { Error = 0 , Success = 1 }
 [AI] Result type used throughout the Tgl API to report operation success or failure. More...
 

Functions

int Succeeded (Result result)
 [AI] Returns whether a Tgl::Result indicates success. More...
 
RendererCreateRenderer ()
 [AI] Instantiates and returns a new Tgl::Renderer implementation. More...
 
double DegreesToRadians (double degrees)
 [AI] Converts an angle from degrees to radians. More...
 
double RadiansToDegrees (double radians)
 [AI] Converts an angle from radians to degrees. More...
 

Detailed Description

[AI] Namespace containing all classes related to the 3D graphics abstraction/rendering engine.

[AI] Used as an abstraction layer over Direct3D (Retained Mode) and device representations in the LEGO Island engine. [AI]

Typedef Documentation

◆ FloatMatrix4

Tgl::FloatMatrix4

[AI] Represents a 4x4 matrix of single-precision floating point values.

[AI] Commonly used for 3D geometric transformations and coordinate operations (such as translation, rotation, or scaling).

Definition at line 53 of file tglvector.h.

Enumeration Type Documentation

◆ ColorModel

[AI] Represents available color models for rendering.

Not used in the shipped game; exact semantics are inferred. [AI]

[AI] Includes ramp-based or true RGB color models (possibly for palette vs. truecolor rendering). [AI]

Enumerator
Ramp 

[AI] Uses a color ramp (palette/indexed color). [AI]

RGB 

[AI] Uses direct RGB color values. [AI]

Definition at line 18 of file tgl.h.

◆ LightType

[AI] Types of lights supported in the renderer.

[AI]

[AI] Used to define the nature and behavior of a light source—ambient, point, spot, directional, or parallel point. [AI]

Enumerator
Ambient 

[AI] Non-directional lighting applied equally everywhere. [AI]

Point 

[AI] Light emitted from a point in all directions. [AI]

Spot 

[AI] Light that emits a cone-shaped beam from a point. [AI]

Directional 

[AI] Parallel light rays, such as sunlight. [AI]

ParallelPoint 

[AI] Similar to point, but with parallel rays. [AI]

Definition at line 42 of file tgl.h.

◆ MaterialMode

[AI] Determines how material properties are sourced for a group/mesh.

[AI] Specifies if the group's material will be inherited or specified explicitly; inferred from assembly, not present in leaked Tgl code. [AI]

Enumerator
FromParent 

[AI] Inherit material from parent. [AI]

FromFrame 

[AI] Use material from the current frame. [AI]

FromMesh 

[AI] Use material specified at the mesh level. [AI]

Definition at line 75 of file tgl.h.

◆ ProjectionType

[AI] Projection modes for camera/view transforms.

[AI]

[AI] Determines whether the scene is rendered with perspective or orthographic projection. [AI]

Enumerator
Perspective 

[AI] Distant objects appear smaller. [AI]

Orthographic 

[AI] Objects keep constant size regardless of distance. [AI]

Definition at line 55 of file tgl.h.

◆ Result

[AI] Result type used throughout the Tgl API to report operation success or failure.

[AI]

[AI] Standardizes error handling in the Tgl API. [AI]

Enumerator
Error 

[AI] Operation failed. [AI]

Success 

[AI] Operation succeeded. [AI]

Definition at line 126 of file tgl.h.

◆ ShadingModel

[AI] Represents shading models available for rendering geometry.

[AI]

[AI] Determines the type of lighting and surface shading calculation performed (e.g., wireframe, flat, Gouraud, or Phong shading). [AI]

Enumerator
Wireframe 

[AI] No shading; renders only mesh edges. [AI]

UnlitFlat 

[AI] Flat shading without lighting calculations. [AI]

Flat 

[AI] Flat shaded, possibly single color per polygon with lighting. [AI]

Gouraud 

[AI] Gouraud (vertex-interpolated) shading. [AI]

Phong 

[AI] Phong (pixel-level) shading, if supported. [AI]

Definition at line 29 of file tgl.h.

◆ TextureMappingMode

[AI] Methods for mapping textures onto geometry.

[AI]

[AI] Affects perspective correction when rendering textured geometry. [AI]

Enumerator
Linear 

[AI] Linear interpolation (faster, less accurate). [AI]

PerspectiveCorrect 

[AI] Perspective-correct mapping (higher quality). [AI]

Definition at line 65 of file tgl.h.

Function Documentation

◆ CreateRenderer()

Renderer * Tgl::CreateRenderer ( )

[AI] Instantiates and returns a new Tgl::Renderer implementation.

[AI]

Returns
Renderer* New renderer or nullptr on error. [AI]

Definition at line 8 of file renderer.cpp.

◆ DegreesToRadians()

double Tgl::DegreesToRadians ( double  degrees)
inline

[AI] Converts an angle from degrees to radians.

Parameters
degreesAngle in degrees. [AI]
Returns
[AI] Angle converted to radians.

[AI] Uses the mathematical formula: radians = degrees × (π / 180).

Definition at line 32 of file tglvector.h.

◆ RadiansToDegrees()

double Tgl::RadiansToDegrees ( double  radians)
inline

[AI] Converts an angle from radians to degrees.

Parameters
radiansAngle in radians. [AI]
Returns
[AI] Angle converted to degrees.

[AI] Uses the mathematical formula: degrees = radians × (180 / π).

Definition at line 43 of file tglvector.h.

◆ Succeeded()

int Tgl::Succeeded ( Result  result)
inline

[AI] Returns whether a Tgl::Result indicates success.

[AI]

Parameters
resultResult to test. [AI]
Returns
int Returns 1 if the result is Tgl::Success, 0 otherwise. [AI]

Definition at line 136 of file tgl.h.