The Vish Visualization Shell 0.3
Vish
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Wizt::RenderNamespace::Lighting Struct Reference

A set of light sources. More...

#include <ocean/Anemonia/RenderNamespace.hpp>

Inheritance diagram for Wizt::RenderNamespace::Lighting:
MemCore::Ageable Wizt::Seagrass

Public Member Functions

unsigned defineLightFunctions (glsl &lightshader) const
 Defines all the light functions as provided by the LightSource shaders managed here, with increasing light source function name.
 
bool isYoungerThan (const MemCore::Ageable &) const
 Check if any light source is younger than the provided argument (which may require re-compilation of the dependent shader code).
 
- Public Member Functions inherited from MemCore::Ageable
 Ageable () noexcept
 Constructor; remembers birth time from current time counter.
 
constexpr Ageable (age_t t) noexcept
 Constructor with explicit time value.
 
constexpr Ageable (const Ageable &A) noexcept
 Copy constructor.
 
 Ageable (const volatile Ageable &A) noexcept
 Copy constructor.
 
constexpr const AgeablegetAge () const
 Return reference to this age, useful for derived classes.
 
bool isNewerThan (const Ageable &a) const noexcept
 Comparison operator.
 
bool isOlderThan (const Ageable &a) const noexcept
 Comparison operator.
 
bool isYoungerThan (const Ageable &a) const noexcept
 Comparison operator (alias to isNewerThan() )
 
bool operator!= (const Ageable &a) const noexcept
 Comparison operator.
 
bool operator< (const Ageable &a) const noexcept
 Comparison operator.
 
bool operator<= (const Ageable &a) const noexcept
 Comparision operator.
 
bool operator<= (const volatile Ageable &a) const volatile noexcept
 Comparision operator.
 
bool operator== (const Ageable &a) const noexcept
 Comparison operator.
 
bool operator> (const Ageable &a) const noexcept
 Comparison operator.
 
bool operator> (const volatile Ageable &a) const volatile throw ()
 Comparision operator.
 
bool operator>= (const Ageable &a) const noexcept
 Comparision operator.
 
bool operator>= (const volatile Ageable &a) const volatile noexcept
 Comparison operator.
 
constexpr void resetAge () noexcept
 Set time value to InfinitelyOld().
 
void setInfinitelyNew () noexcept
 Set time value to InfinitelyOld().
 
age_t time_value () const noexcept
 Return an object's current age.
 
age_t time_value () const volatile noexcept
 Return an object's current age.
 
Ageabletouch () noexcept
 Mark the current object as being modified "now".
 
age_t update (age_t age) noexcept
 Set the age of the current object to a specific age if that is newer than the current one.
 
age_t update (const Ageable &Other) noexcept
 Set the age of the current object to the age of another object if that other one is newer than the current one.
 
age_t update (const volatile Ageable &Other) volatile noexcept
 Set the age of the current object to the age of another object if that other one is newer than the current one.
 
 ~Ageable () noexcept
 Destructor.
 

Static Public Member Functions

static glsl getEffectiveLightName (glsl &lightshader, unsigned LightNr)
 Convenience function for a text replacement operation:
 
static glsl postfix (unsigned NumberOfLightSources)
 Define a global function.
 
- Static Public Member Functions inherited from MemCore::Ageable
static const AgeableInfinitelyNew () noexcept
 Return a time that is infinitely in the future (well, sort of).
 
static constexpr const AgeableInfinitelyOld () noexcept
 Return a time that is infinitely in the past (well, sort of).
 
static age_t now () noexcept
 Return the current global time.
 

Static Public Attributes

static const glsl placeholder
 The placeholder text in glsl code provided by lightsources that will be replaced with the number that is assigned to this lightsource for final shader compilation.
 

Detailed Description

A set of light sources.

See also
LightSource

Member Function Documentation

◆ getEffectiveLightName()

RenderNamespace::glsl Wizt::RenderNamespace::Lighting::getEffectiveLightName ( RenderNamespace::glsl lightshader,
unsigned  LightNr 
)
static

Convenience function for a text replacement operation:

Substitute any occurance of the placeholde in the given lightshader with the light number.

◆ postfix()

RenderNamespace::glsl Wizt::RenderNamespace::Lighting::postfix ( unsigned  NumberOfLightSources)
static

Define a global function.

vec3 getLightAtVertex(vec3 vertex)

which computes the sum of calling all defined light functions.