esp::gfx namespace

GFX library.

Namespaces

namespace CubeMapShaderBaseTexUnitSpace
namespace pbrTextureUnitSpace
namespace replay

Classes

class CubeMap
class CubeMapCamera
class CubeMapShaderBase
class DebugLineRender
Singleton utility class for on-the-fly rendering of lines (e.g. every frame). This is intended for debugging or simple UX for prototype apps. The API prioritizes ease-of-use over maximum runtime performance.
class DoubleSphereCameraShader
class Drawable
Drawable for use with DrawableGroup.
class DrawableConfiguration
class DrawableGroup
Group of drawables, and shared group parameters.
class EquirectangularShader
class GaussianFilterShader
A shader to visualize the depth buffer information.
class GenericDrawable
struct InstanceSkinData
Stores skinning data for an instance. Contains association information of graphics bones and articulated object links.
struct LightInfo
Contains a single light's information.
class MeshVisualizerDrawable
class PbrDrawable
class PbrEquiRectangularToCubeMapShader
a shader to convert a HDRi image (the environment map in equirectangular form) to a cubemap
class PbrIBLHelper
This class performs 2 functions. It derives the Irradiance and Precomputed Cubemaps based on an Enironment map texture, and it provides references to all the assets that are then consumed by the PBR shader for IBL functionality.
class PbrPrecomputedMapShader
A shader to output the irradiance map, applied in the IBL diffuse part, or the prefiltered environment map, applied in the IBL specular part, based on the user setting.
class PbrShader
class RenderCamera
class Renderer
class RenderTarget
struct Rig
Contains the nodes that control the articulations of a skinned model instance.
struct SkinData
Stores skinning data for an asset.
class TextureVisualizerShader
A shader to visualize the depth buffer information.
class WindowlessContext

Enums

enum class DrawableType: uint8_t { None = 0, Generic = 1, Pbr = 2, MeshVisualizer = 3 }
enum class LightPositionModel { Camera = 0, Global = 1, Object = 2 }
enum class LightType { Point = 0, Directional = 1, Spot = 2 }

Typedefs

using LightSetup = std::vector<LightInfo>
A set of LightInfos.
using ShaderManager = Magnum::ResourceManager<Magnum::GL::AbstractShaderProgram, gfx::LightSetup, Magnum::Trade::MaterialData>

Functions

auto createRenderCameraBind(pybind11::module& m) -> pybind11::class_<RenderCamera, Magnum::SceneGraph::PyFeature<RenderCamera>, Magnum::SceneGraph::Camera3D, Magnum::SceneGraph::PyFeatureHolder<RenderCamera>>
Create pybind class for RenderCamera, and partially define bindings. Bindings should be completed in initGfxBindings, once dependent bindings have been created (i.e. SceneNode)
auto createRendererBind(pybind11::module& m) -> pybind11::class_<esp::gfx::Renderer, std::shared_ptr<Renderer>>
Create pybind class for Renderer, and partially define bindings. Bindings should be completed in initGfxBindings, once dependent bindings have been created (i.e. SceneNode)
void finalInitRenderer(pybind11::class_<Renderer, std::shared_ptr<Renderer>>& renderer)
Finalize Renderer bindings definitions after sim bindings class defined.
void initRenderTargetBind(pybind11::module& m)
Specify bindings for RenderTarget. Done separately so that it can be performed before Sensor bindings are defined, which depend on it.
void initGfxBindings(pybind11::module& m, pybind11::class_<RenderCamera, Magnum::SceneGraph::PyFeature<RenderCamera>, Magnum::SceneGraph::Camera3D, Magnum::SceneGraph::PyFeatureHolder<RenderCamera>>& renderCamera)
Specify bindings for constructs in esp::gfx namespace.
auto espLoggingSubsystem() -> logging::Subsystem
auto operator==(const LightInfo& a, const LightInfo& b) -> bool
auto operator!=(const LightInfo& a, const LightInfo& b) -> bool
auto getLightPositionRelativeToCamera(const LightInfo& light, const Magnum::Matrix4& transformationMatrix, const Magnum::Matrix4& cameraMatrix) -> Magnum::Vector4
Get position relative to a camera for a LightInfo and a rendered object. light.position and the return value are Vector4, with w == 1 for positions and w == 0 for directions.
auto getLightPositionRelativeToWorld(const LightInfo& light, const Magnum::Matrix4& transformationMatrix, const Magnum::Matrix4& cameraMatrix) -> Magnum::Vector4
Get light position in world space for a LightInfo and a rendered object. light.position and the return value are Vector4, with w == 1 for positions and w == 0 for directions.
auto getLightsAtBoxCorners(const Magnum::Range3D& box, const Magnum::Color3& lightColor = Magnum::Color3{10.0f}) -> LightSetup
Get a LightSetup with lights at the corners of a box.
auto getDefaultLights() -> LightSetup
Get a LightSetup with some directional lights approximating daylight.
auto getAmbientLightColor(const LightSetup& lightSetup) -> Magnum::Color3
Get a single, combined ambient light color for use with the Phong lighting model.
void setLightSetupForSubTree(scene::SceneNode& root, const Magnum::ResourceKey& lightSetup)
Set the light setup for a subtree.

Enum documentation

enum class esp::gfx::DrawableType: uint8_t

enum class esp::gfx::LightPositionModel

Enumerators
Camera

Light position is relative to the camera.

Global

Light position is relative to scene.

Object

Light position is relative to the object being rendered.

enum class esp::gfx::LightType

Enumerators
Point

The type of light described by a light info.

Directional

Spot

Typedef documentation

using esp::gfx::LightSetup = std::vector<LightInfo>

A set of LightInfos.

Function documentation

pybind11::class_<RenderCamera, Magnum::SceneGraph::PyFeature<RenderCamera>, Magnum::SceneGraph::Camera3D, Magnum::SceneGraph::PyFeatureHolder<RenderCamera>> esp::gfx::createRenderCameraBind(pybind11::module& m)

Create pybind class for RenderCamera, and partially define bindings. Bindings should be completed in initGfxBindings, once dependent bindings have been created (i.e. SceneNode)

pybind11::class_<esp::gfx::Renderer, std::shared_ptr<Renderer>> esp::gfx::createRendererBind(pybind11::module& m)

Create pybind class for Renderer, and partially define bindings. Bindings should be completed in initGfxBindings, once dependent bindings have been created (i.e. SceneNode)

void esp::gfx::finalInitRenderer(pybind11::class_<Renderer, std::shared_ptr<Renderer>>& renderer)

Finalize Renderer bindings definitions after sim bindings class defined.

void esp::gfx::initRenderTargetBind(pybind11::module& m)

Specify bindings for RenderTarget. Done separately so that it can be performed before Sensor bindings are defined, which depend on it.

void esp::gfx::initGfxBindings(pybind11::module& m, pybind11::class_<RenderCamera, Magnum::SceneGraph::PyFeature<RenderCamera>, Magnum::SceneGraph::Camera3D, Magnum::SceneGraph::PyFeatureHolder<RenderCamera>>& renderCamera)

Specify bindings for constructs in esp::gfx namespace.

bool esp::gfx::operator==(const LightInfo& a, const LightInfo& b)

bool esp::gfx::operator!=(const LightInfo& a, const LightInfo& b)

Magnum::Vector4 esp::gfx::getLightPositionRelativeToCamera(const LightInfo& light, const Magnum::Matrix4& transformationMatrix, const Magnum::Matrix4& cameraMatrix)

Get position relative to a camera for a LightInfo and a rendered object. light.position and the return value are Vector4, with w == 1 for positions and w == 0 for directions.

Parameters
light
transformationMatrix Describes object position relative to camera
cameraMatrix Describes world position relative to camera
Returns Magnum::Vector4 Light position relative to camera

Magnum::Vector4 esp::gfx::getLightPositionRelativeToWorld(const LightInfo& light, const Magnum::Matrix4& transformationMatrix, const Magnum::Matrix4& cameraMatrix)

Get light position in world space for a LightInfo and a rendered object. light.position and the return value are Vector4, with w == 1 for positions and w == 0 for directions.

Parameters
light
transformationMatrix Describes object position relative to camera
cameraMatrix Describes world position relative
Returns Magnum::Vector4 Light position in world space

LightSetup esp::gfx::getLightsAtBoxCorners(const Magnum::Range3D& box, const Magnum::Color3& lightColor = Magnum::Color3{10.0f})

Get a LightSetup with lights at the corners of a box.

LightSetup esp::gfx::getDefaultLights()

Get a LightSetup with some directional lights approximating daylight.

Magnum::Color3 esp::gfx::getAmbientLightColor(const LightSetup& lightSetup)

Get a single, combined ambient light color for use with the Phong lighting model.

void esp::gfx::setLightSetupForSubTree(scene::SceneNode& root, const Magnum::ResourceKey& lightSetup)

Set the light setup for a subtree.

Parameters
root Subtree root
lightSetup LightSetup key in the ShaderManager

All drawables in the subtree starting at root will have the new lightSetup