Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | List of all members
castor3d::Engine Class Reference

#include <Engine.hpp>

Inheritance diagram for castor3d::Engine:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Engine:
Collaboration graph
[legend]

Public Member Functions

C3D_API Engine (EngineConfig config)
 Constructor.
 
C3D_API Engine (EngineConfig config, castor::LoggerInstance &logger)
 Constructor.
 
C3D_API ~Engine () noexcept
 Destructor.
 
C3D_API void initialise (uint32_t wantedFPS=100, bool threaded=false)
 Initialisation function, Sets the wanted frame rate.
 
C3D_API void cleanup ()
 Cleanup function, destroys everything created from the beginning.
 
C3D_API bool loadRenderer (castor::String const &type)
 Loads a renderer plug-in, given the renderer type.
 
C3D_API void loadRenderer (Renderer renderer)
 Loads a renderer plug-in, given the renderer type.
 
C3D_API CpuFrameEventpostEvent (CpuFrameEventUPtr event) const
 Posts a frame event to the default frame listener.
 
C3D_API void sendEvent (GpuFrameEventUPtr event) const
 If a device is enabled, executes the given event, if not posts it to the default frame listener.
 
C3D_API GpuFrameEventpostEvent (GpuFrameEventUPtr event) const
 Posts a frame event to the default frame listener.
 
C3D_API bool fireMouseMove (castor::Position const &position, bool ctrl, bool alt, bool shift)
 Fires a mouse move event.
 
C3D_API void update (CpuUpdater &updater)
 Updates the engine, CPU wise.
 
C3D_API void update (GpuUpdater &updater)
 Updates the engine, GPU wise.
 
C3D_API void upload (UploadData &uploader)
 Updates the buffers.
 
C3D_API bool isCleaned () const noexcept
 Retrieves the cleanup status.
 
C3D_API void setCleaned () noexcept
 Tells the engine is cleaned up.
 
C3D_API void pushCpuJob (castor::AsyncJobQueue::Job job)
 Enqueues the given CPU job.
 
C3D_API castor::RgbaColour getNextRainbowColour () const
 Retrieves a colour issued from a rainbow colours iterator.
 
C3D_API void registerWindow (RenderWindow &window)
 Registers a RenderWindow.
 
C3D_API void unregisterWindow (RenderWindow const &window)
 Unregisters a RenderWindow.
 
C3D_API void registerParsers (castor::String name, castor::AttributeParsers parsers, castor::StrUInt32Map sections, castor::UserContextCreator contextCreator)
 Registers additional parsers for SceneFileParser.
 
C3D_API void unregisterParsers (castor::String const &name) noexcept
 Unregisters parsers for SceneFileParser.
 
C3D_API void registerTimer (castor::String const &category, FramePassTimer &timer)
 Registers a render pass timer.
 
C3D_API void unregisterTimer (castor::String const &category, FramePassTimer &timer) noexcept
 Unregisters a render pass timer.
 
C3D_API LightingModelID registerLightingModel (castor::String const &name, shader::LightingModelCreator creator, BackgroundModelID backgroundModelId) const
 Registers a Lighting Model.
 
C3D_API void unregisterLightingModel (LightingModelID lightingModelId, BackgroundModelID backgroundModelId) const
 Unregisters a combination of Lighting Model and Background Model.
 
C3D_API void unregisterLightingModel (castor::String const &name, BackgroundModelID backgroundModelId) const
 Unregisters a Lighting Model.
 
C3D_API BackgroundModelID registerBackgroundModel (castor::String const &name, shader::BackgroundModelCreator creator)
 Registers a Background Model.
 
C3D_API BackgroundModelID unregisterBackgroundModel (castor::String const &name)
 Unregisters a Background Model.
 
C3D_API void registerBuffer (ShaderBuffer const &buffer)
 Registers a ShaderBuffer.
 
C3D_API void unregisterBuffer (ShaderBuffer const &buffer)
 Unregisters a ShaderBuffer.
 
C3D_API void registerPassModel (BackgroundModelID backgroundModelId, PassRegisterInfo const &info) const
 Registers the pass info with given background model.
 
C3D_API void registerPassModels (PassRegisterInfo const &info) const
 Registers the given pass info with all background models.
 
C3D_API void unregisterPassModel (BackgroundModelID backgroundModelId, LightingModelID lightingModelId) const
 Unregisters a combination of lighting model and background model.
 
C3D_API void unregisterPassModels (castor::String const &type) const
 Unregisters all combinations of given lighting model and background models.
 
C3D_API void registerSpecificsBuffer (castor::String const &name, castor3d::SpecificsBuffer buffer) const
 Registers a specific data shader buffer.
 
C3D_API void unregisterSpecificsBuffer (castor::String const &name) const
 Unregisters a pass' specific data buffer.
 
C3D_API void addSpecificsBuffersBindings (ashes::VkDescriptorSetLayoutBindingArray &bindings, VkShaderStageFlags shaderStages, uint32_t &index) const
 Addw the pass' specific data buffer into the given descriptor layout bindings array.
 
C3D_API void addSpecificsBuffersDescriptors (ashes::WriteDescriptorSetArray &descriptorWrites, uint32_t &index) const
 Writes the pass' specific data buffer into the given descriptor writes array.
 
C3D_API void createSpecificsBuffersPassBindings (crg::FramePass &pass, uint32_t &index) const
 Writes the pass' specific data buffer bindings into given frame pass.
 
C3D_API void declareSpecificsShaderBuffers (sdw::ShaderWriter &writer, castor::StringMap< castor3d::shader::BufferBaseUPtr > &buffers, uint32_t &binding, uint32_t set) const
 Declares pass' specific data shader buffers.
 
C3D_API PassComponentID registerPassComponent (castor::String const &type, PassComponentPluginUPtr componentPlugin) const
 Registers a pass component.
 
C3D_API void unregisterPassComponent (castor::String const &type) const
 Unregisters a pass component.
 
C3D_API SubmeshComponentID registerSubmeshComponent (castor::String const &type, SubmeshComponentPluginUPtr componentPlugin) const
 Registers a pass component.
 
C3D_API void unregisterSubmeshComponent (castor::String const &type) const
 Unregisters a pass component.
 
C3D_API void registerRenderPassType (castor::String const &renderPassType, castor::UniquePtr< RenderPassRegisterInfo > info)
 Registers a scene render pass type, used to render given material pass type.
 
C3D_API void setRenderPassTypeConfiguration (castor::String const &renderPassType, Parameters parameters)
 Registers a scene render pass type's configuration parameters.
 
C3D_API Parameters getRenderPassTypeConfiguration (castor::String const &renderPassType) const
 Retrieve a scene render pass type's configuration parameters.
 
C3D_API RenderPassTypeID getRenderPassTypeID (castor::String const &renderPassType) const
 Retrieves the ID for given scene render pass type name.
 
C3D_API RenderPassRegisterInfogetRenderPassInfo (castor::String const &renderPassType) const
 Retrieves a scene render pass type's creation informations.
 
C3D_API castor::Vector< RenderPassRegisterInfo * > getRenderPassInfos (TechniquePassEvent event) const
 Retrieves the scene render passes type creation informations.
 
C3D_API void unregisterRenderPassType (castor::String const &renderPassType)
 Unregisters a scene render pass type.
 

Getters.

C3D_API castor::String getDefaultLightingModelName () const
 
C3D_API ToneMappingFactory const & getToneMappingFactory () const
 
C3D_API ToneMappingFactorygetToneMappingFactory ()
 
C3D_API PostEffectFactory const & getPostEffectFactory () const
 
C3D_API PostEffectFactorygetPostEffectFactory ()
 
C3D_API uint32_t getWantedFps () const
 
C3D_API castor3d::MaterialObs getDefaultMaterial () const
 
C3D_API bool hasMeshShaders () const
 
C3D_API uint32_t getMaxPassTypeCount () const
 
C3D_API RenderDevicegetRenderDevice () const
 
C3D_API ControlsManagergetControlsManager () const
 
C3D_API UploadDatagetUploadData () const noexcept
 
C3D_API ast::ShaderAllocator & getShaderAllocator ()
 
castor::String const & getAppName () const noexcept
 
Version const & getAppVersion () const noexcept
 
bool isShaderValidationEnabled () const noexcept
 
bool isValidationEnabled () const noexcept
 
uint32_t getShaderDebugLevel () const noexcept
 
bool areUpdateOptimisationsEnabled () const noexcept
 
bool isRandomisationEnabled () const noexcept
 
bool isApiTraceEnabled () const noexcept
 
bool areTextShadersKept () const noexcept
 
bool areDebugTargetsEnabled () const noexcept
 
castor::ImageCache const & getImageCache () const noexcept
 
castor::ImageCachegetImageCache () noexcept
 
castor::FontCache const & getFontCache () const noexcept
 
castor::FontCachegetFontCache () noexcept
 
UserInputListenerRPtr getUserInputListener () noexcept
 
RenderSystemgetRenderSystem () const noexcept
 
auto getDefaultSampler () const noexcept
 
auto getLightsSampler () const noexcept
 
auto const & getAdditionalParsers () const noexcept
 
Version const & getVersion () const noexcept
 
bool hasRenderLoop () const noexcept
 
RenderLoopgetRenderLoop () const noexcept
 
bool isThreaded () const noexcept
 
MeshFactorygetMeshFactory () const noexcept
 
PassFactorygetPassFactory () const noexcept
 
PassComponentRegistergetPassComponentsRegister () const noexcept
 
SubmeshComponentRegistergetSubmeshComponentsRegister () const noexcept
 
ImporterFileFactorygetImporterFileFactory () const noexcept
 
ParticleFactorygetParticleFactory () const noexcept
 
castor::CpuInformations const & getCpuInformations () const noexcept
 
LightingModelID getDefaultLightingModel () const noexcept
 
castor::ImageLoader const & getImageLoader () const noexcept
 
castor::ImageLoadergetImageLoader () noexcept
 
castor::ImageWriter const & getImageWriter () const noexcept
 
ashes::RendererList const & getRenderersList () const noexcept
 
castor::LoggerInstancegetLogger () const noexcept
 
uint32_t getLpvGridSize () const noexcept
 
uint32_t getMaxImageSize () const noexcept
 
auto const & getRenderWindows () const noexcept
 
crg::ResourceHandler & getGraphResourceHandler () noexcept
 
LightingModelFactorygetLightingModelFactory () const noexcept
 
shader::BackgroundModelFactory const & getBackgroundModelFactory () const noexcept
 
shader::BackgroundModelFactorygetBackgroundModelFactory () noexcept
 
SceneRPtr getLoadingScene () const noexcept
 
Texture const & getPrefilteredBrdfTexture () const noexcept
 
castor::LengthUnit getLengthUnit () const noexcept
 

Mutators.

C3D_API void setLoadingScene (SceneUPtr scene)
 
void setUserInputListener (UserInputListenerUPtr listener) noexcept
 
template<typename ListenerT >
void setUserInputListenerT (castor::UniquePtr< ListenerT > listener) noexcept
 
void setDefaultLightingModel (LightingModelID value) noexcept
 
void setMaxImageSize (uint32_t size) noexcept
 
void setLpvGridSize (uint32_t size) noexcept
 
template<typename ComponentT >
PassComponentID registerPassComponent (CreatePassComponentPlugin const &createPlugin=&ComponentT::createPlugin)
 
template<typename ComponentT >
SubmeshComponentID registerSubmeshComponent (CreateSubmeshComponentPlugin const &createPlugin=&ComponentT::createPlugin)
 
void setLengthUnit (castor::LengthUnit value) noexcept
 

Fonts.

template<typename ... ParametersT>
castor::FontCache::ElementPtrT createFont (castor::FontCache::ElementKeyT const &key, ParametersT &&... parameters) const
 
template<typename ... ParametersT>
castor::FontCache::ElementObsT addNewFont (castor::FontCache::ElementKeyT const &key, ParametersT &&... parameters)
 
castor::FontCache::ElementObsT addFont (castor::FontCache::ElementKeyT const &key, castor::FontCache::ElementPtrT &element, bool initialise=false)
 
void removeFont (castor::FontCache::ElementKeyT const &key, bool cleanup=false)
 
castor::FontCache::ElementObsT findFont (castor::FontCache::ElementKeyT const &key) const
 
bool hasFont (castor::FontCache::ElementKeyT const &key) const
 
castor::FontCache::ElementObsT tryFindFont (castor::FontCache::ElementKeyT const &key) const
 

Images.

template<typename ... ParametersT>
castor::ImageCache::ElementPtrT createImage (castor::ImageCache::ElementKeyT const &key, ParametersT &&... parameters) const
 
template<typename ... ParametersT>
castor::ImageCache::ElementObsT addNewImage (castor::ImageCache::ElementKeyT const &key, ParametersT &&... parameters)
 
castor::ImageCache::ElementObsT addImage (castor::ImageCache::ElementKeyT const &key, castor::ImageCache::ElementPtrT &element, bool initialise=false)
 
void removeImage (castor::ImageCache::ElementKeyT const &key, bool cleanup=false) noexcept
 
castor::ImageCache::ElementObsT findImage (castor::ImageCache::ElementKeyT const &key) const
 
bool hasImage (castor::ImageCache::ElementKeyT const &key) const
 
castor::ImageCache::ElementObsT tryFindImage (castor::ImageCache::ElementKeyT const &key) const noexcept
 
template<typename ... ParametersT>
castor::ImageCache::ElementObsT tryAddImage (castor::ImageCache::ElementKeyT const &name, bool initialise, castor::ImageCache::ElementObsT &created, ParametersT &&... parameters)
 

Static Public Member Functions

static C3D_API castor::Path getPluginsDirectory ()
 Retrieves plug-ins path.
 
static C3D_API castor::Path getEngineDirectory ()
 Gives the Castor directory.
 
static C3D_API castor::Path getDataDirectory ()
 Retrieves data path.
 
static C3D_API std::locale const & getLocale ()
 Retrieves data path.
 

Additional Inherited Members

- Protected Member Functions inherited from castor::Unique< Engine >
 Unique (Engine *pThis)
 Constructor.
 
 ~Unique () noexcept
 Destructor.
 

Constructor & Destructor Documentation

◆ Engine() [1/2]

C3D_API castor3d::Engine::Engine ( EngineConfig config)
explicit

Constructor.

Parameters
[in]configThe engine configuration.

◆ Engine() [2/2]

C3D_API castor3d::Engine::Engine ( EngineConfig config,
castor::LoggerInstance & logger )

Constructor.

Parameters
[in]configThe engine configuration.
[in]loggerThe logger instance.

◆ ~Engine()

C3D_API castor3d::Engine::~Engine ( )
noexcept

Destructor.

Member Function Documentation

◆ addFont()

castor::FontCache::ElementObsT castor3d::Engine::addFont ( castor::FontCache::ElementKeyT const & key,
castor::FontCache::ElementPtrT & element,
bool initialise = false )
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::add(), getFontCache(), and initialise().

Here is the call graph for this function:

◆ addImage()

castor::ImageCache::ElementObsT castor3d::Engine::addImage ( castor::ImageCache::ElementKeyT const & key,
castor::ImageCache::ElementPtrT & element,
bool initialise = false )
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::add(), getImageCache(), and initialise().

Here is the call graph for this function:

◆ addNewFont()

template<typename ... ParametersT>
castor::FontCache::ElementObsT castor3d::Engine::addNewFont ( castor::FontCache::ElementKeyT const & key,
ParametersT &&... parameters )
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::add(), and getFontCache().

Here is the call graph for this function:

◆ addNewImage()

template<typename ... ParametersT>
castor::ImageCache::ElementObsT castor3d::Engine::addNewImage ( castor::ImageCache::ElementKeyT const & key,
ParametersT &&... parameters )
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::add(), and getImageCache().

Here is the call graph for this function:

◆ addSpecificsBuffersBindings()

C3D_API void castor3d::Engine::addSpecificsBuffersBindings ( ashes::VkDescriptorSetLayoutBindingArray & bindings,
VkShaderStageFlags shaderStages,
uint32_t & index ) const

Addw the pass' specific data buffer into the given descriptor layout bindings array.

Parameters
[in,out]bindingsReceives the buffers descriptor layout bindings.
[in]shaderStagesThe shader stage flags.
[in,out]indexThe binding index.

◆ addSpecificsBuffersDescriptors()

C3D_API void castor3d::Engine::addSpecificsBuffersDescriptors ( ashes::WriteDescriptorSetArray & descriptorWrites,
uint32_t & index ) const

Writes the pass' specific data buffer into the given descriptor writes array.

Parameters
[in,out]descriptorWritesReceives the buffers descriptor writes.
[in,out]indexThe binding index.

◆ areDebugTargetsEnabled()

bool castor3d::Engine::areDebugTargetsEnabled ( ) const
inlinenoexcept

◆ areTextShadersKept()

bool castor3d::Engine::areTextShadersKept ( ) const
inlinenoexcept

◆ areUpdateOptimisationsEnabled()

bool castor3d::Engine::areUpdateOptimisationsEnabled ( ) const
inlinenoexcept

◆ cleanup()

C3D_API void castor3d::Engine::cleanup ( )

Cleanup function, destroys everything created from the beginning.

Remarks
Destroys also RenderWindows, the only things left after that is RenderSystem and loaded plug-ins

Referenced by removeFont(), and removeImage().

Here is the caller graph for this function:

◆ createFont()

template<typename ... ParametersT>
castor::FontCache::ElementPtrT castor3d::Engine::createFont ( castor::FontCache::ElementKeyT const & key,
ParametersT &&... parameters ) const
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::create(), and getFontCache().

Here is the call graph for this function:

◆ createImage()

template<typename ... ParametersT>
castor::ImageCache::ElementPtrT castor3d::Engine::createImage ( castor::ImageCache::ElementKeyT const & key,
ParametersT &&... parameters ) const
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::create(), and getImageCache().

Here is the call graph for this function:

◆ createSpecificsBuffersPassBindings()

C3D_API void castor3d::Engine::createSpecificsBuffersPassBindings ( crg::FramePass & pass,
uint32_t & index ) const

Writes the pass' specific data buffer bindings into given frame pass.

Parameters
[in,out]passThe target frame pass.
[in,out]indexThe binding index.

◆ declareSpecificsShaderBuffers()

C3D_API void castor3d::Engine::declareSpecificsShaderBuffers ( sdw::ShaderWriter & writer,
castor::StringMap< castor3d::shader::BufferBaseUPtr > & buffers,
uint32_t & binding,
uint32_t set ) const

Declares pass' specific data shader buffers.

Parameters
[in,out]writerThe shader writer.
[out]buffersReceives the registered shader buffers.
[in,out]bindingThe descriptor binding index.
[in]setThe descriptor set index.

◆ findFont()

castor::FontCache::ElementObsT castor3d::Engine::findFont ( castor::FontCache::ElementKeyT const & key) const
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::find(), and getFontCache().

Here is the call graph for this function:

◆ findImage()

castor::ImageCache::ElementObsT castor3d::Engine::findImage ( castor::ImageCache::ElementKeyT const & key) const
inline

References castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::find(), and getImageCache().

Here is the call graph for this function:

◆ fireMouseMove()

C3D_API bool castor3d::Engine::fireMouseMove ( castor::Position const & position,
bool ctrl,
bool alt,
bool shift )

Fires a mouse move event.

Parameters
[in]positionThe mouse position.
[in]ctrlTells if the Ctrl key is down.
[in]altTells if the Alt key is down.
[in]shiftTells if the Shift key is down.
Returns
true if the event is processed by a handler.

◆ getAdditionalParsers()

auto const & castor3d::Engine::getAdditionalParsers ( ) const
inlinenoexcept

◆ getAppName()

castor::String const & castor3d::Engine::getAppName ( ) const
inlinenoexcept

◆ getAppVersion()

Version const & castor3d::Engine::getAppVersion ( ) const
inlinenoexcept

◆ getBackgroundModelFactory() [1/2]

shader::BackgroundModelFactory const & castor3d::Engine::getBackgroundModelFactory ( ) const
inlinenoexcept

◆ getBackgroundModelFactory() [2/2]

shader::BackgroundModelFactory & castor3d::Engine::getBackgroundModelFactory ( )
inlinenoexcept

◆ getControlsManager()

C3D_API ControlsManager * castor3d::Engine::getControlsManager ( ) const

◆ getCpuInformations()

castor::CpuInformations const & castor3d::Engine::getCpuInformations ( ) const
inlinenoexcept

◆ getDataDirectory()

static C3D_API castor::Path castor3d::Engine::getDataDirectory ( )
static

Retrieves data path.

Returns
The data path

◆ getDefaultLightingModel()

LightingModelID castor3d::Engine::getDefaultLightingModel ( ) const
inlinenoexcept

◆ getDefaultLightingModelName()

C3D_API castor::String castor3d::Engine::getDefaultLightingModelName ( ) const

◆ getDefaultMaterial()

C3D_API castor3d::MaterialObs castor3d::Engine::getDefaultMaterial ( ) const

◆ getDefaultSampler()

auto castor3d::Engine::getDefaultSampler ( ) const
inlinenoexcept

◆ getEngineDirectory()

static C3D_API castor::Path castor3d::Engine::getEngineDirectory ( )
static

Gives the Castor directory.

Returns
The directory

◆ getFontCache() [1/2]

castor::FontCache const & castor3d::Engine::getFontCache ( ) const
inlinenoexcept

Referenced by addFont(), addNewFont(), createFont(), findFont(), hasFont(), removeFont(), and tryFindFont().

Here is the caller graph for this function:

◆ getFontCache() [2/2]

castor::FontCache & castor3d::Engine::getFontCache ( )
inlinenoexcept

◆ getGraphResourceHandler()

crg::ResourceHandler & castor3d::Engine::getGraphResourceHandler ( )
inlinenoexcept

◆ getImageCache() [1/2]

castor::ImageCache const & castor3d::Engine::getImageCache ( ) const
inlinenoexcept

Referenced by addImage(), addNewImage(), createImage(), findImage(), hasImage(), removeImage(), tryAddImage(), and tryFindImage().

Here is the caller graph for this function:

◆ getImageCache() [2/2]

castor::ImageCache & castor3d::Engine::getImageCache ( )
inlinenoexcept

◆ getImageLoader() [1/2]

castor::ImageLoader const & castor3d::Engine::getImageLoader ( ) const
inlinenoexcept

◆ getImageLoader() [2/2]

castor::ImageLoader & castor3d::Engine::getImageLoader ( )
inlinenoexcept

◆ getImageWriter()

castor::ImageWriter const & castor3d::Engine::getImageWriter ( ) const
inlinenoexcept

◆ getImporterFileFactory()

ImporterFileFactory & castor3d::Engine::getImporterFileFactory ( ) const
inlinenoexcept

◆ getLengthUnit()

castor::LengthUnit castor3d::Engine::getLengthUnit ( ) const
inlinenoexcept

◆ getLightingModelFactory()

LightingModelFactory & castor3d::Engine::getLightingModelFactory ( ) const
inlinenoexcept

◆ getLightsSampler()

auto castor3d::Engine::getLightsSampler ( ) const
inlinenoexcept

◆ getLoadingScene()

SceneRPtr castor3d::Engine::getLoadingScene ( ) const
inlinenoexcept

◆ getLocale()

static C3D_API std::locale const & castor3d::Engine::getLocale ( )
static

Retrieves data path.

Returns
The data path

◆ getLogger()

castor::LoggerInstance & castor3d::Engine::getLogger ( ) const
inlinenoexcept

◆ getLpvGridSize()

uint32_t castor3d::Engine::getLpvGridSize ( ) const
inlinenoexcept

◆ getMaxImageSize()

uint32_t castor3d::Engine::getMaxImageSize ( ) const
inlinenoexcept

◆ getMaxPassTypeCount()

C3D_API uint32_t castor3d::Engine::getMaxPassTypeCount ( ) const

◆ getMeshFactory()

MeshFactory & castor3d::Engine::getMeshFactory ( ) const
inlinenoexcept

◆ getNextRainbowColour()

C3D_API castor::RgbaColour castor3d::Engine::getNextRainbowColour ( ) const

Retrieves a colour issued from a rainbow colours iterator.

◆ getParticleFactory()

ParticleFactory & castor3d::Engine::getParticleFactory ( ) const
inlinenoexcept

◆ getPassComponentsRegister()

PassComponentRegister & castor3d::Engine::getPassComponentsRegister ( ) const
inlinenoexcept

◆ getPassFactory()

PassFactory & castor3d::Engine::getPassFactory ( ) const
inlinenoexcept

◆ getPluginsDirectory()

static C3D_API castor::Path castor3d::Engine::getPluginsDirectory ( )
static

Retrieves plug-ins path.

Returns
The plug-ins path

◆ getPostEffectFactory() [1/2]

C3D_API PostEffectFactory & castor3d::Engine::getPostEffectFactory ( )

◆ getPostEffectFactory() [2/2]

C3D_API PostEffectFactory const & castor3d::Engine::getPostEffectFactory ( ) const

◆ getPrefilteredBrdfTexture()

Texture const & castor3d::Engine::getPrefilteredBrdfTexture ( ) const
inlinenoexcept

◆ getRenderDevice()

C3D_API RenderDevice * castor3d::Engine::getRenderDevice ( ) const

◆ getRenderersList()

ashes::RendererList const & castor3d::Engine::getRenderersList ( ) const
inlinenoexcept

◆ getRenderLoop()

RenderLoop & castor3d::Engine::getRenderLoop ( ) const
inlinenoexcept

◆ getRenderPassInfo()

C3D_API RenderPassRegisterInfo * castor3d::Engine::getRenderPassInfo ( castor::String const & renderPassType) const

Retrieves a scene render pass type's creation informations.

Parameters
[in]renderPassTypeThe pass type name.

◆ getRenderPassInfos()

C3D_API castor::Vector< RenderPassRegisterInfo * > castor3d::Engine::getRenderPassInfos ( TechniquePassEvent event) const

Retrieves the scene render passes type creation informations.

Parameters
[in]eventThe event type for wanted passes.

◆ getRenderPassTypeConfiguration()

C3D_API Parameters castor3d::Engine::getRenderPassTypeConfiguration ( castor::String const & renderPassType) const

Retrieve a scene render pass type's configuration parameters.

Parameters
[in]renderPassTypeThe pass type name.
Returns
The pass configuration parameters.

◆ getRenderPassTypeID()

C3D_API RenderPassTypeID castor3d::Engine::getRenderPassTypeID ( castor::String const & renderPassType) const

Retrieves the ID for given scene render pass type name.

Parameters
[in]renderPassTypeThe pass type name.

◆ getRenderSystem()

RenderSystem * castor3d::Engine::getRenderSystem ( ) const
inlinenoexcept

◆ getRenderWindows()

auto const & castor3d::Engine::getRenderWindows ( ) const
inlinenoexcept

◆ getShaderAllocator()

C3D_API ast::ShaderAllocator & castor3d::Engine::getShaderAllocator ( )

◆ getShaderDebugLevel()

uint32_t castor3d::Engine::getShaderDebugLevel ( ) const
inlinenoexcept

◆ getSubmeshComponentsRegister()

SubmeshComponentRegister & castor3d::Engine::getSubmeshComponentsRegister ( ) const
inlinenoexcept

◆ getToneMappingFactory() [1/2]

C3D_API ToneMappingFactory & castor3d::Engine::getToneMappingFactory ( )

◆ getToneMappingFactory() [2/2]

C3D_API ToneMappingFactory const & castor3d::Engine::getToneMappingFactory ( ) const

◆ getUploadData()

C3D_API UploadData & castor3d::Engine::getUploadData ( ) const
noexcept

◆ getUserInputListener()

UserInputListenerRPtr castor3d::Engine::getUserInputListener ( )
inlinenoexcept

◆ getVersion()

Version const & castor3d::Engine::getVersion ( ) const
inlinenoexcept

◆ getWantedFps()

C3D_API uint32_t castor3d::Engine::getWantedFps ( ) const

◆ hasFont()

bool castor3d::Engine::hasFont ( castor::FontCache::ElementKeyT const & key) const
inline

References getFontCache(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::has().

Here is the call graph for this function:

◆ hasImage()

bool castor3d::Engine::hasImage ( castor::ImageCache::ElementKeyT const & key) const
inline

References getImageCache(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::has().

Here is the call graph for this function:

◆ hasMeshShaders()

C3D_API bool castor3d::Engine::hasMeshShaders ( ) const

◆ hasRenderLoop()

bool castor3d::Engine::hasRenderLoop ( ) const
inlinenoexcept

◆ initialise()

C3D_API void castor3d::Engine::initialise ( uint32_t wantedFPS = 100,
bool threaded = false )

Initialisation function, Sets the wanted frame rate.

Parameters
[in]wantedFPSThe wanted FPS count
[in]threadedIf false, the render can't be threaded

Referenced by addFont(), addImage(), and tryAddImage().

Here is the caller graph for this function:

◆ isApiTraceEnabled()

bool castor3d::Engine::isApiTraceEnabled ( ) const
inlinenoexcept

◆ isCleaned()

C3D_API bool castor3d::Engine::isCleaned ( ) const
noexcept

Retrieves the cleanup status.

Remarks
Thread-safe
Returns
true if cleaned up

◆ isRandomisationEnabled()

bool castor3d::Engine::isRandomisationEnabled ( ) const
inlinenoexcept

◆ isShaderValidationEnabled()

bool castor3d::Engine::isShaderValidationEnabled ( ) const
inlinenoexcept

◆ isThreaded()

bool castor3d::Engine::isThreaded ( ) const
inlinenoexcept

◆ isValidationEnabled()

bool castor3d::Engine::isValidationEnabled ( ) const
inlinenoexcept

◆ loadRenderer() [1/2]

C3D_API bool castor3d::Engine::loadRenderer ( castor::String const & type)

Loads a renderer plug-in, given the renderer type.

Parameters
[in]typeThe renderer type.
Returns
true if ok

◆ loadRenderer() [2/2]

C3D_API void castor3d::Engine::loadRenderer ( Renderer renderer)

Loads a renderer plug-in, given the renderer type.

Parameters
[in]rendererThe renderer.

◆ postEvent() [1/2]

C3D_API CpuFrameEvent * castor3d::Engine::postEvent ( CpuFrameEventUPtr event) const

Posts a frame event to the default frame listener.

Parameters
[in]eventThe event to add

◆ postEvent() [2/2]

C3D_API GpuFrameEvent * castor3d::Engine::postEvent ( GpuFrameEventUPtr event) const

Posts a frame event to the default frame listener.

Parameters
[in]eventThe event to add

◆ pushCpuJob()

C3D_API void castor3d::Engine::pushCpuJob ( castor::AsyncJobQueue::Job job)

Enqueues the given CPU job.

Parameters
[in]jobThe job to execute.

◆ registerBackgroundModel()

C3D_API BackgroundModelID castor3d::Engine::registerBackgroundModel ( castor::String const & name,
shader::BackgroundModelCreator creator )

Registers a Background Model.

Parameters
[in]nameThe model name.
[in]creatorThe model creation function.
Returns
The model ID.

◆ registerBuffer()

C3D_API void castor3d::Engine::registerBuffer ( ShaderBuffer const & buffer)

Registers a ShaderBuffer.

Parameters
[in]bufferThe ShaderBuffer.

◆ registerLightingModel()

C3D_API LightingModelID castor3d::Engine::registerLightingModel ( castor::String const & name,
shader::LightingModelCreator creator,
BackgroundModelID backgroundModelId ) const

Registers a Lighting Model.

Parameters
[in]nameThe model name.
[in]backgroundModelIdThe background model ID.
[in]creatorThe model creation function.
Returns
The model ID.

◆ registerParsers()

C3D_API void castor3d::Engine::registerParsers ( castor::String name,
castor::AttributeParsers parsers,
castor::StrUInt32Map sections,
castor::UserContextCreator contextCreator )

Registers additional parsers for SceneFileParser.

Parameters
[in]nameThe registering name.
[in]parsersThe parsers.
[in]sectionsThe sections.
[in]contextCreatorThe user parser context creation function.

◆ registerPassComponent() [1/2]

C3D_API PassComponentID castor3d::Engine::registerPassComponent ( castor::String const & type,
PassComponentPluginUPtr componentPlugin ) const

Registers a pass component.

Parameters
[in]typeThe component type name.
[in]componentPluginThe component's specific functions.

Referenced by registerPassComponent().

Here is the caller graph for this function:

◆ registerPassComponent() [2/2]

template<typename ComponentT >
PassComponentID castor3d::Engine::registerPassComponent ( CreatePassComponentPlugin const & createPlugin = &ComponentT::createPlugin)
inline

References registerPassComponent().

Here is the call graph for this function:

◆ registerPassModel()

C3D_API void castor3d::Engine::registerPassModel ( BackgroundModelID backgroundModelId,
PassRegisterInfo const & info ) const

Registers the pass info with given background model.

Parameters
[in]backgroundModelIdThe background model.
[in]infoThe pass registering info.

◆ registerPassModels()

C3D_API void castor3d::Engine::registerPassModels ( PassRegisterInfo const & info) const

Registers the given pass info with all background models.

Parameters
[in]infoThe pass registering info.

◆ registerRenderPassType()

C3D_API void castor3d::Engine::registerRenderPassType ( castor::String const & renderPassType,
castor::UniquePtr< RenderPassRegisterInfo > info )

Registers a scene render pass type, used to render given material pass type.

Parameters
[in]renderPassTypeThe pass type name.
[in]infoThe pass creation informations.

◆ registerSpecificsBuffer()

C3D_API void castor3d::Engine::registerSpecificsBuffer ( castor::String const & name,
castor3d::SpecificsBuffer buffer ) const

Registers a specific data shader buffer.

Parameters
[in,out]nameThe shader buffer name.
[out]bufferThe shader buffer.

◆ registerSubmeshComponent() [1/2]

C3D_API SubmeshComponentID castor3d::Engine::registerSubmeshComponent ( castor::String const & type,
SubmeshComponentPluginUPtr componentPlugin ) const

Registers a pass component.

Parameters
[in]typeThe component type name.
[in]componentPluginThe component's specific functions.

Referenced by registerSubmeshComponent().

Here is the caller graph for this function:

◆ registerSubmeshComponent() [2/2]

template<typename ComponentT >
SubmeshComponentID castor3d::Engine::registerSubmeshComponent ( CreateSubmeshComponentPlugin const & createPlugin = &ComponentT::createPlugin)
inline

References registerSubmeshComponent().

Here is the call graph for this function:

◆ registerTimer()

C3D_API void castor3d::Engine::registerTimer ( castor::String const & category,
FramePassTimer & timer )

Registers a render pass timer.

Parameters
[in]categoryThe timer category name.
[in]timerThe timer to register.

◆ registerWindow()

C3D_API void castor3d::Engine::registerWindow ( RenderWindow & window)

Registers a RenderWindow.

Parameters
[in]windowThe RenderWindow.

◆ removeFont()

void castor3d::Engine::removeFont ( castor::FontCache::ElementKeyT const & key,
bool cleanup = false )
inline

References cleanup(), getFontCache(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::remove().

Here is the call graph for this function:

◆ removeImage()

void castor3d::Engine::removeImage ( castor::ImageCache::ElementKeyT const & key,
bool cleanup = false )
inlinenoexcept

References cleanup(), getImageCache(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::remove().

Here is the call graph for this function:

◆ sendEvent()

C3D_API void castor3d::Engine::sendEvent ( GpuFrameEventUPtr event) const

If a device is enabled, executes the given event, if not posts it to the default frame listener.

Parameters
[in]eventThe event.

◆ setCleaned()

C3D_API void castor3d::Engine::setCleaned ( )
noexcept

Tells the engine is cleaned up.

Remarks
Thread-safe

◆ setDefaultLightingModel()

void castor3d::Engine::setDefaultLightingModel ( LightingModelID value)
inlinenoexcept

◆ setLengthUnit()

void castor3d::Engine::setLengthUnit ( castor::LengthUnit value)
inlinenoexcept

◆ setLoadingScene()

C3D_API void castor3d::Engine::setLoadingScene ( SceneUPtr scene)

◆ setLpvGridSize()

void castor3d::Engine::setLpvGridSize ( uint32_t size)
inlinenoexcept

◆ setMaxImageSize()

void castor3d::Engine::setMaxImageSize ( uint32_t size)
inlinenoexcept

◆ setRenderPassTypeConfiguration()

C3D_API void castor3d::Engine::setRenderPassTypeConfiguration ( castor::String const & renderPassType,
Parameters parameters )

Registers a scene render pass type's configuration parameters.

Parameters
[in]renderPassTypeThe pass type name.
[in]parametersThe pass configuration parameters.

◆ setUserInputListener()

void castor3d::Engine::setUserInputListener ( UserInputListenerUPtr listener)
inlinenoexcept

◆ setUserInputListenerT()

template<typename ListenerT >
void castor3d::Engine::setUserInputListenerT ( castor::UniquePtr< ListenerT > listener)
inlinenoexcept

◆ tryAddImage()

template<typename ... ParametersT>
castor::ImageCache::ElementObsT castor3d::Engine::tryAddImage ( castor::ImageCache::ElementKeyT const & name,
bool initialise,
castor::ImageCache::ElementObsT & created,
ParametersT &&... parameters )
inline

References getImageCache(), initialise(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::tryAdd().

Here is the call graph for this function:

◆ tryFindFont()

castor::FontCache::ElementObsT castor3d::Engine::tryFindFont ( castor::FontCache::ElementKeyT const & key) const
inline

References getFontCache(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::tryFind().

Here is the call graph for this function:

◆ tryFindImage()

castor::ImageCache::ElementObsT castor3d::Engine::tryFindImage ( castor::ImageCache::ElementKeyT const & key) const
inlinenoexcept

References getImageCache(), and castor::ResourceCacheBaseT< ResT, KeyT, TraitsT >::tryFind().

Here is the call graph for this function:

◆ unregisterBackgroundModel()

C3D_API BackgroundModelID castor3d::Engine::unregisterBackgroundModel ( castor::String const & name)

Unregisters a Background Model.

Parameters
[in]nameThe model name.

◆ unregisterBuffer()

C3D_API void castor3d::Engine::unregisterBuffer ( ShaderBuffer const & buffer)

Unregisters a ShaderBuffer.

Parameters
[in]bufferThe ShaderBuffer.

◆ unregisterLightingModel() [1/2]

C3D_API void castor3d::Engine::unregisterLightingModel ( castor::String const & name,
BackgroundModelID backgroundModelId ) const

Unregisters a Lighting Model.

Parameters
[in]nameThe model name.
[in]backgroundModelIdThe background model ID.

◆ unregisterLightingModel() [2/2]

C3D_API void castor3d::Engine::unregisterLightingModel ( LightingModelID lightingModelId,
BackgroundModelID backgroundModelId ) const

Unregisters a combination of Lighting Model and Background Model.

Parameters
[in]lightingModelIdThe lighting model ID.
[in]backgroundModelIdThe bavkground model ID.

◆ unregisterParsers()

C3D_API void castor3d::Engine::unregisterParsers ( castor::String const & name)
noexcept

Unregisters parsers for SceneFileParser.

Parameters
[in]nameThe registering name.

◆ unregisterPassComponent()

C3D_API void castor3d::Engine::unregisterPassComponent ( castor::String const & type) const

Unregisters a pass component.

Parameters
[in]typeThe component type name.

◆ unregisterPassModel()

C3D_API void castor3d::Engine::unregisterPassModel ( BackgroundModelID backgroundModelId,
LightingModelID lightingModelId ) const

Unregisters a combination of lighting model and background model.

Parameters
[in]backgroundModelIdThe background model.
[in]lightingModelIdThe lighting model.

◆ unregisterPassModels()

C3D_API void castor3d::Engine::unregisterPassModels ( castor::String const & type) const

Unregisters all combinations of given lighting model and background models.

Parameters
[in]typeThe lighting model name.

◆ unregisterRenderPassType()

C3D_API void castor3d::Engine::unregisterRenderPassType ( castor::String const & renderPassType)

Unregisters a scene render pass type.

Parameters
[in]renderPassTypeThe pass type name.

◆ unregisterSpecificsBuffer()

C3D_API void castor3d::Engine::unregisterSpecificsBuffer ( castor::String const & name) const

Unregisters a pass' specific data buffer.

Parameters
[in,out]nameThe shader buffer name.

◆ unregisterSubmeshComponent()

C3D_API void castor3d::Engine::unregisterSubmeshComponent ( castor::String const & type) const

Unregisters a pass component.

Parameters
[in]typeThe component type name.

◆ unregisterTimer()

C3D_API void castor3d::Engine::unregisterTimer ( castor::String const & category,
FramePassTimer & timer )
noexcept

Unregisters a render pass timer.

Parameters
[in]categoryThe timer category name.
[in]timerThe timer to unregister.

◆ unregisterWindow()

C3D_API void castor3d::Engine::unregisterWindow ( RenderWindow const & window)

Unregisters a RenderWindow.

Parameters
[in]windowThe RenderWindow.

◆ update() [1/2]

C3D_API void castor3d::Engine::update ( CpuUpdater & updater)

Updates the engine, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

C3D_API void castor3d::Engine::update ( GpuUpdater & updater)

Updates the engine, GPU wise.

Parameters
[in,out]updaterThe update data.

◆ upload()

C3D_API void castor3d::Engine::upload ( UploadData & uploader)

Updates the buffers.

Parameters
[in,out]uploaderReceives the upload requests.

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