|
DIE Engine
|
#include <renderer.h>
Classes | |
| struct | Node |
| Renderer-side node (compact variant, fed by Map::pass). More... | |
| struct | Wall |
| Renderer-side wall (compact variant, fed by Map::pass). More... | |
| struct | Texture |
| Renderer-side texture strip (column of square tiles). More... | |
| struct | Light |
| Renderer-side light (compact variant, fed by Map::pass). More... | |
Public Member Functions | |
| Renderer () | |
| void | init () |
| Allocate the object pools, frames and tables, load the config. | |
| void | terminate () |
| Release all the renderer resources. | |
| void | render (Viewpoint &vp) |
| Render the scene to the internal frame (see getImage). | |
| QImage * | getImage () const |
| Frame rendered by the last render() call. | |
| void | setFlags (RENDERER_FLAGS flags) |
| Replace the whole RENDERER_FLAGS bitmask. | |
| void | checkFlag (RENDERER_FLAGS flag, bool checked) |
| Set or clear a single renderer flag. | |
| RENDERER_FLAGS | getFlags () const |
| void | setGlowmapSize (int size) |
| Request a glowmap resize (applied at the start of the next render). | |
| int | getGlowmapSize () const |
| void | setGlowmapArea (float area) |
| Set the world area covered by the glowmap, in world units. | |
| float | getGlowmapArea () const |
| void | setFramesReso (int width, int height) |
| Request a frame resize (applied at the start of the next render). | |
| int | getFrameResoX () const |
| int | getFrameResoY () const |
| void | setFOVAngle (float angle) |
| Set the horizontal field of view, in degrees. | |
| void | setFOVDistanceNear (float distance) |
| void | setFOVDistanceFar (float distance) |
| void | clickRegister (int x, int y) |
| Register a frame position to pick a wall during the next render. | |
| uint16_t | clickGetWallID () const |
| Wall picked by the last registered click (see clickRegister). | |
Public Attributes | |
| uint32_t | flags |
| active RENDERER_FLAGS bitmask | |
| float | fovAngle |
| horizontal FOV, in degrees | |
| float | fovDistanceNear |
| near clip distance, in world units | |
| float | fovDistanceFar |
| far clip distance, in world units | |
| uint32_t | sunAmbient |
| packed RGB ambient color | |
| uint32_t | sunRayColor |
| packed RGB direct ray color | |
| QVector3D | sunRayDirection |
| normalised ray direction | |
| float | sunAmbientStrength |
| ambient intensity (0.0 .. 1.0) | |
| float | sunRayStrength |
| ray intensity (0.0 .. 1.0) | |
| float | fogDistanceNear |
| fog start distance, in world units | |
| float | fogDistanceFar |
| fog full-density distance, in world units | |
| uint32_t | fogFarColor |
| packed RGB fog color | |
| uint16_t | fogFlags |
| combination of FOG_FLAGS | |
| float | occlusionLength |
| corner darkening reach, in world units | |
| float | occlusionDarken |
| darkening strength (0.0 .. 1.0) | |
| float | motionBlurFactor |
| previous frame blend, in percent (0 .. 100) | |
| float | vignetteInnerRadius |
| darkening start, in percent of half the frame height | |
| float | vignetteOuterRadius |
| full black, in percent of half the frame height | |
| float | gammaKRed |
| red smoothstep tone gain (1.0 = full curve) | |
| float | gammaKGreen |
| green smoothstep tone gain | |
| float | gammaKBlue |
| blue smoothstep tone gain | |
| Node * | nodes |
| int | nodesCount |
| int | nodesAllocated |
| Wall * | walls |
| int | wallsCount |
| int | wallsAllocated |
| Texture * | textures |
| int | texturesCount |
| int | texturesAllocated |
| Light * | lights |
| int | lightsCount |
| int | lightsAllocated |
| float | lastFloor |
| float | lastCeiling |
Static Public Attributes | |
| static constexpr int | DefaultFrameResoX = 960 |
| static constexpr int | DefaultFrameResoY = 536 |
| static constexpr int | DefaultGlowmapReso = 256 |
| static constexpr float | DefaultGlowmapArea = 1024.0f |
| static constexpr int | DefaultNodesMax = 2048 |
| static constexpr int | DefaultWallsMax = 1024 |
| static constexpr int | DefaultTexturesMax = 32 |
| static constexpr int | DefaultLightsMax = 64 |
| static constexpr float | GlowSampleDistance = 1.0f |
| static constexpr float | GlowBleedFactor = 0.25f |
| static constexpr float | LightFallOff = 32.0f |
| static constexpr float | HeightMax = 16384.0f |
| static constexpr float | HeightMin = -16384.0f |
| static constexpr uint16_t | ClickNoWall = 0xFFFF |
| Sentinel returned by clickGetWallID when no wall was picked. | |
| Renderer::Renderer | ( | ) |
| void Renderer::checkFlag | ( | RENDERER_FLAGS | flag, |
| bool | checked ) |
Set or clear a single renderer flag.
|
inline |
Wall picked by the last registered click (see clickRegister).
| void Renderer::clickRegister | ( | int | x, |
| int | y ) |
Register a frame position to pick a wall during the next render.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Frame rendered by the last render() call.
| void Renderer::init | ( | ) |
Allocate the object pools, frames and tables, load the config.
| void Renderer::render | ( | Viewpoint & | vp | ) |
Render the scene to the internal frame (see getImage).
| void Renderer::setFlags | ( | RENDERER_FLAGS | flags | ) |
Replace the whole RENDERER_FLAGS bitmask.
| void Renderer::setFOVAngle | ( | float | angle | ) |
Set the horizontal field of view, in degrees.
| void Renderer::setFOVDistanceFar | ( | float | distance | ) |
| void Renderer::setFOVDistanceNear | ( | float | distance | ) |
| void Renderer::setFramesReso | ( | int | width, |
| int | height ) |
Request a frame resize (applied at the start of the next render).
| void Renderer::setGlowmapArea | ( | float | area | ) |
Set the world area covered by the glowmap, in world units.
| void Renderer::setGlowmapSize | ( | int | size | ) |
Request a glowmap resize (applied at the start of the next render).
| void Renderer::terminate | ( | ) |
Release all the renderer resources.
|
staticconstexpr |
Sentinel returned by clickGetWallID when no wall was picked.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
| uint32_t Renderer::flags |
active RENDERER_FLAGS bitmask
| float Renderer::fogDistanceFar |
fog full-density distance, in world units
| float Renderer::fogDistanceNear |
fog start distance, in world units
| uint32_t Renderer::fogFarColor |
packed RGB fog color
| uint16_t Renderer::fogFlags |
combination of FOG_FLAGS
| float Renderer::fovAngle |
horizontal FOV, in degrees
| float Renderer::fovDistanceFar |
far clip distance, in world units
| float Renderer::fovDistanceNear |
near clip distance, in world units
| float Renderer::gammaKBlue |
blue smoothstep tone gain
| float Renderer::gammaKGreen |
green smoothstep tone gain
| float Renderer::gammaKRed |
red smoothstep tone gain (1.0 = full curve)
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
| float Renderer::lastCeiling |
| float Renderer::lastFloor |
|
staticconstexpr |
| Light* Renderer::lights |
| int Renderer::lightsAllocated |
| int Renderer::lightsCount |
| float Renderer::motionBlurFactor |
previous frame blend, in percent (0 .. 100)
| Node* Renderer::nodes |
| int Renderer::nodesAllocated |
| int Renderer::nodesCount |
| float Renderer::occlusionDarken |
darkening strength (0.0 .. 1.0)
| float Renderer::occlusionLength |
corner darkening reach, in world units
| uint32_t Renderer::sunAmbient |
packed RGB ambient color
| float Renderer::sunAmbientStrength |
ambient intensity (0.0 .. 1.0)
| uint32_t Renderer::sunRayColor |
packed RGB direct ray color
| QVector3D Renderer::sunRayDirection |
normalised ray direction
| float Renderer::sunRayStrength |
ray intensity (0.0 .. 1.0)
| Texture* Renderer::textures |
| int Renderer::texturesAllocated |
| int Renderer::texturesCount |
| float Renderer::vignetteInnerRadius |
darkening start, in percent of half the frame height
| float Renderer::vignetteOuterRadius |
full black, in percent of half the frame height
| Wall* Renderer::walls |
| int Renderer::wallsAllocated |
| int Renderer::wallsCount |