Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
foray::util::NoiseSource Class Reference

Uses std::mt19937_64 to generate a r32u image of decent quality random noise. More...

#include <foray_noisesource.hpp>

Inheritance diagram for foray::util::NoiseSource:
foray::core::ManagedResource foray::NoMoveDefaults

Public Member Functions

 NoiseSource ()=default
 
void Create (core::Context *context, uint32_t edge=2048U, uint32_t depth=1)
 Creates and uploads.
 
virtual void Regenerate ()
 Regenerates all values and uploads to texture.
 
virtual void Destroy () override
 Destroy the resource.
 
virtual bool Exists () const override
 Return true, if the managed resource is allocated.
 
- Public Member Functions inherited from foray::core::ManagedResource
virtual std::string_view GetTypeName () const
 Return a hint for the type of resource managed by the instantiation.
 
 ManagedResource ()
 Default constructor registers the resource.
 
 ManagedResource (std::string_view name)
 Registers the resource and sets its name.
 
virtual ~ManagedResource ()
 Unregisters the resource.
 
std::string_view GetName () const
 Return a custom name for the object.
 
virtual void SetName (std::string_view name)
 Set a custom name for the object.
 
std::string Print () const
 Print name and type in one string.
 
- Public Member Functions inherited from foray::NoMoveDefaults
 NoMoveDefaults ()=default
 
 NoMoveDefaults (const NoMoveDefaults &other)=delete
 
 NoMoveDefaults (NoMoveDefaults &&other)=default
 
NoMoveDefaultsoperator= (const NoMoveDefaults &other)=delete
 

Protected Attributes

core::ManagedImage mImage
 
- Protected Attributes inherited from foray::core::ManagedResource
std::string mName
 This objects custom name.
 

Additional Inherited Members

- Static Public Member Functions inherited from foray::core::ManagedResource
static void sPrintAllocatedResources (bool printAsWarning)
 Print a list of all registered existing resources.
 
static const std::unordered_set< ManagedResource * > * GetTotalAllocatedResources ()
 

Detailed Description

Uses std::mt19937_64 to generate a r32u image of decent quality random noise.

Constructor & Destructor Documentation

◆ NoiseSource()

foray::util::NoiseSource::NoiseSource ( )
default

Member Function Documentation

◆ Create()

void foray::util::NoiseSource::Create ( core::Context context,
uint32_t  edge = 2048U,
uint32_t  depth = 1 
)

Creates and uploads.

Parameters
edgeWidth & Height
depthDepth

◆ Destroy()

virtual void foray::util::NoiseSource::Destroy ( )
overridevirtual

Destroy the resource.

Remarks
This method must be callable even if the resource has not been initialized yet. This method must call any Destroy() overloads of child objects and of base classes

Implements foray::core::ManagedResource.

◆ Exists()

virtual bool foray::util::NoiseSource::Exists ( ) const
overridevirtual

Return true, if the managed resource is allocated.

Example: Vulkan object stored could be nullptr or instantiated

Implements foray::core::ManagedResource.

◆ Regenerate()

virtual void foray::util::NoiseSource::Regenerate ( )
virtual

Regenerates all values and uploads to texture.

Member Data Documentation

◆ mImage

core::ManagedImage foray::util::NoiseSource::mImage
protected

The documentation for this class was generated from the following file: