esp/gfx/LightSetup.h file

Namespaces

namespace esp
Root namespace.
namespace esp::gfx
GFX library.

Classes

struct esp::gfx::LightInfo
Contains a single light's information.

Enums

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.

Functions

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 get a single, combined ambient light color for use with the Phong lighting model.