The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
Wizt::ShaderLightSource::MyLightSource Struct Reference
Inheritance diagram for Wizt::ShaderLightSource::MyLightSource:
Wizt::RenderNamespace::LightSource MemCore::ReferenceBase< LightSource > Wizt::RenderNamespace::ProgramVariables MemCore::Ageable

Public Member Functions

glsl getLightFunction () override
 For implementing stuff like this:
 
- Public Member Functions inherited from MemCore::ReferenceBase< LightSource >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< LightSource, LightSource > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
 
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
 
refcount_t refcount () const noexcept
 The strong reference count.
 
 ReferenceBase (LightSource *that) noexcept
 Constructor, initializes reference counter to zero.
 
const auto & self () const
 Return weak pointer to the object self.
 
refcount_t wrefcount () const noexcept
 The weak reference count.
 
- Public Member Functions inherited from Wizt::RenderNamespace::ProgramVariables
ProgramVariablesmerge (const ProgramVariables &, substitutes_t &substitutes, const std::string &src_original, const std::string &src_substitute)
 Merge a set of program variables into this current one and substitute the variable names by another string thereby.
 
void remove (const substitutes_t &substitutes)
 Remove all variables as given in the set.
 
template<class T >
void setMandatoryValue (const std::string &name, const T &t, bool isMandatory=true)
 Set a value that will raise an exception if that variable is not used in the shader program.
 
void setPointValue (const std::string &name, const Eagle::FixedArray< double, 3 > &v)
 Set an vec3 uniform that is suspect to coordinate shifting.
 
void setValue (const std::string &name, const Eagle::FixedArray< double, 2 > &v)
 Set an vec2 uniform.
 
void setValue (const std::string &name, const Eagle::FixedArray< double, 3 > &v)
 Set an vec3 uniform.
 
void setValue (const std::string &name, const Eagle::FixedArray< double, 4 > &v)
 Set an vec4 uniform.
 
void setValue (const std::string &name, const Eagle::FixedArray< float, 4 > &v)
 Set an vec4 uniform of floats.
 
void setValue (const std::string &name, const Eagle::FixedArray< int, 2 > &v)
 Set an vec2 uniform.
 
void setValue (const std::string &name, const Eagle::FixedArray< int, 3 > &v)
 Set an vec3 uniform.
 
void setValue (const std::string &name, const Eagle::Quadratic< 3, float > &M)
 Set an integer uniform.
 
void setValue (const std::string &name, double d)
 Set a floating point uniform.
 
void setValue (const std::string &name, int i)
 Set an integer uniform.
 
- 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.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< LightSource >
using reference_domain_t = LightSource
 The type of the base class.
 
using SelfPtr_t = WeakPtr< LightSource, LightSource >
 Type for a pointer to this object itself.
 
- 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.
 
- Public Attributes inherited from Wizt::RenderNamespace::ProgramVariables
FloatValues_t FloatValues
 A set of floating point values that will be set for this program.
 
IntValues_t IntValues
 A set of integer values that will be set for this program.
 
std::map< std::string, Eagle::FixedArray< int, 2 > > iVec2Values
 A set of 3D integer vectors that will be set for this program as uniforms.
 
std::map< std::string, Eagle::FixedArray< int, 3 > > iVec3Values
 A set of 3D integer vectors that will be set for this program as uniforms.
 
std::map< std::string, std::vector< Eagle::Quadratic< 3, float > > > M33ArrayValues
 A set of matric values that will be set for this program.
 
std::map< std::string, Eagle::Quadratic< 3, float > > M33Values
 A set of matric values that will be set for this program.
 
std::map< std::string, Eagle::FixedArray< double, 3 > > Point3Values
 A set of 3D vectors that will be set for this program as uniforms.
 
std::map< std::string, Eagle::FixedArray< double, 2 > > Vec2Values
 A set of 2D vectors that will be set for this program as uniforms.
 
std::map< std::string, Eagle::FixedArray< double, 3 > > Vec3Values
 A set of 3D vectors that will be set for this program as uniforms.
 
std::map< std::string, Eagle::FixedArray< double, 4 > > Vec4Values
 A set of 4D vectors that will be set for this program as uniforms.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< LightSource >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Member Function Documentation

◆ getLightFunction()

glsl Wizt::ShaderLightSource::MyLightSource::getLightFunction ( )
overridevirtual

For implementing stuff like this:

https://stackoverflow.com/questions/11212933/glsl-gl-lightsource-point-directional-spot-differentiation#11213804 https://en.wikipedia.org/wiki/Specular_highlight

This function must return a GLSL shader code that defines a function with this signature:

Output types.
Definition VSlotContainer.hpp:972
Input types.
Definition VSlotContainer.hpp:966

where $$ is replaced automatically at render time by the number of the light source during rendering.

Implements Wizt::RenderNamespace::LightSource.