Castor3D  ..
Public Member Functions | Static Public Member Functions | List of all members
Castor3D::Engine Class Reference

Main System. More...

+ Inheritance diagram for Castor3D::Engine:
+ Collaboration diagram for Castor3D::Engine:

Public Member Functions

C3D_API Engine ()
 Constructor. More...
 
C3D_API ~Engine ()
 Destructor. More...
 
C3D_API void Initialise (uint32_t p_wantedFPS=100, bool p_threaded=false)
 Initialisation function, sets the wanted frame rate. More...
 
C3D_API void Cleanup ()
 Cleanup function, destroys everything created from the beginning. More...
 
C3D_API bool LoadRenderer (eRENDERER_TYPE p_type)
 Loads a renderer plug-in, given the renderer type. More...
 
C3D_API void PostEvent (FrameEventSPtr p_pEvent)
 Posts a frame event to the default frame listener. More...
 
C3D_API bool IsCleaned ()
 Retrieves the cleanup status. More...
 
C3D_API void SetCleaned ()
 Tells the engine is cleaned up. More...
 
C3D_API bool SupportsShaderModel (eSHADER_MODEL p_eShaderModel)
 Checks the current support for given shader model. More...
 
C3D_API void RegisterParsers (Castor::String const &p_name, Castor::FileParser::AttributeParsersBySection &&p_parsers)
 Registers additional parsers for SceneFileParser. More...
 
C3D_API void RegisterSections (Castor::String const &p_name, Castor::StrUIntMap const &p_sections)
 Registers additional sections for SceneFileParser. More...
 
C3D_API void UnregisterParsers (Castor::String const &p_name)
 Unregisters parsers for SceneFileParser. More...
 
C3D_API void UnregisterSections (Castor::String const &p_name)
 Unregisters sections for SceneFileParser. More...
 
Castor::ImageManager const & GetImageManager () const
 Retrieves the images collection. More...
 
Castor::ImageManager & GetImageManager ()
 Retrieves the images collection. More...
 
Castor::FontManager const & GetFontManager () const
 Retrieves the fonts collection. More...
 
Castor::FontManager & GetFontManager ()
 Retrieves the fonts collection. More...
 
RenderSystemGetRenderSystem () const
 Retrieves the RenderSystem. More...
 
BlendStateSPtr GetDefaultBlendState () const
 Retrieves the default BlendState (no blend) More...
 
SamplerSPtr GetDefaultSampler () const
 Retrieves the default Sampler. More...
 
SamplerSPtr GetLightsSampler () const
 Retrieves the lighting Sampler. More...
 
std::map< Castor::String, Castor::FileParser::AttributeParsersBySection > const & GetAdditionalParsers () const
 Retrieves the SceneFileParser additional parsers. More...
 
std::map< Castor::String, Castor::StrUIntMap > const & GetAdditionalSections () const
 Retrieves the SceneFileParser additional sections. More...
 
Version const & GetVersion () const
 
bool HasRenderLoop () const
 
RenderLoop const & GetRenderLoop () const
 
RenderLoopGetRenderLoop ()
 
void SetPerObjectLighting (bool p_value)
 Sets the need for per object lighting. More...
 
bool GetPerObjectLighting ()
 
bool IsThreaded ()
 

Static Public Member Functions

static C3D_API Castor::Path GetPluginsDirectory ()
 Retrieves plug-ins path. More...
 
static C3D_API Castor::Path GetEngineDirectory ()
 Gives the Castor directory. More...
 
static C3D_API Castor::Path GetDataDirectory ()
 Retrieves data path. More...
 

Detailed Description

Main System.

Author
Sylvain DOREMUS
Date
09/02/2010
Version
0.1
Remarks
Holds the render windows, the plug-ins, the render drivers...

Constructor & Destructor Documentation

◆ Engine()

C3D_API Castor3D::Engine::Engine ( )

Constructor.

◆ ~Engine()

C3D_API Castor3D::Engine::~Engine ( )

Destructor.

Member Function Documentation

◆ 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

◆ GetAdditionalParsers()

std::map< Castor::String, Castor::FileParser::AttributeParsersBySection > const& Castor3D::Engine::GetAdditionalParsers ( ) const
inline

Retrieves the SceneFileParser additional parsers.

Returns
The parsers.

◆ GetAdditionalSections()

std::map< Castor::String, Castor::StrUIntMap > const& Castor3D::Engine::GetAdditionalSections ( ) const
inline

Retrieves the SceneFileParser additional sections.

Returns
The sections.

◆ GetDataDirectory()

static C3D_API Castor::Path Castor3D::Engine::GetDataDirectory ( )
static

Retrieves data path.

Returns
The data path

◆ GetDefaultBlendState()

BlendStateSPtr Castor3D::Engine::GetDefaultBlendState ( ) const
inline

Retrieves the default BlendState (no blend)

Returns
The value

◆ GetDefaultSampler()

SamplerSPtr Castor3D::Engine::GetDefaultSampler ( ) const
inline

Retrieves the default Sampler.

Returns
The Sampler

◆ GetEngineDirectory()

static C3D_API Castor::Path Castor3D::Engine::GetEngineDirectory ( )
static

Gives the Castor directory.

Returns
The directory

◆ GetFontManager() [1/2]

Castor::FontManager const& Castor3D::Engine::GetFontManager ( ) const
inline

Retrieves the fonts collection.

Returns
The collection

◆ GetFontManager() [2/2]

Castor::FontManager& Castor3D::Engine::GetFontManager ( )
inline

Retrieves the fonts collection.

Returns
The collection

◆ GetImageManager() [1/2]

Castor::ImageManager const& Castor3D::Engine::GetImageManager ( ) const
inline

Retrieves the images collection.

Returns
The collection

◆ GetImageManager() [2/2]

Castor::ImageManager& Castor3D::Engine::GetImageManager ( )
inline

Retrieves the images collection.

Returns
The collection

◆ GetLightsSampler()

SamplerSPtr Castor3D::Engine::GetLightsSampler ( ) const
inline

Retrieves the lighting Sampler.

Returns
The Sampler.

◆ GetPerObjectLighting()

bool Castor3D::Engine::GetPerObjectLighting ( )
inline
Returns
The need for per object lighting.

◆ GetPluginsDirectory()

static C3D_API Castor::Path Castor3D::Engine::GetPluginsDirectory ( )
static

Retrieves plug-ins path.

Returns
The plug-ins path

◆ GetRenderLoop() [1/2]

RenderLoop const& Castor3D::Engine::GetRenderLoop ( ) const
inline
Returns
The render loop.

◆ GetRenderLoop() [2/2]

RenderLoop& Castor3D::Engine::GetRenderLoop ( )
inline
Returns
The render loop.

◆ GetRenderSystem()

RenderSystem* Castor3D::Engine::GetRenderSystem ( ) const
inline

Retrieves the RenderSystem.

Returns
The RenderSystem

◆ GetVersion()

Version const& Castor3D::Engine::GetVersion ( ) const
inline
Returns
The engine version.

◆ HasRenderLoop()

bool Castor3D::Engine::HasRenderLoop ( ) const
inline
Returns
The render loop.

◆ Initialise()

C3D_API void Castor3D::Engine::Initialise ( uint32_t  p_wantedFPS = 100,
bool  p_threaded = false 
)

Initialisation function, sets the wanted frame rate.

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

◆ IsCleaned()

C3D_API bool Castor3D::Engine::IsCleaned ( )

Retrieves the cleanup status.

Remarks
Thread-safe
Returns
true if cleaned up

◆ IsThreaded()

bool Castor3D::Engine::IsThreaded ( )
inline
Returns
Tells if the engine uses an asynchronous render loop.

◆ LoadRenderer()

C3D_API bool Castor3D::Engine::LoadRenderer ( eRENDERER_TYPE  p_type)

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

Parameters
[in]p_typeThe renderer type
Returns
true if ok

◆ PostEvent()

C3D_API void Castor3D::Engine::PostEvent ( FrameEventSPtr  p_pEvent)

◆ RegisterParsers()

C3D_API void Castor3D::Engine::RegisterParsers ( Castor::String const &  p_name,
Castor::FileParser::AttributeParsersBySection &&  p_parsers 
)

Registers additional parsers for SceneFileParser.

Parameters
[in]p_nameThe registering name.
[in]p_parsersThe parsers.

◆ RegisterSections()

C3D_API void Castor3D::Engine::RegisterSections ( Castor::String const &  p_name,
Castor::StrUIntMap const &  p_sections 
)

Registers additional sections for SceneFileParser.

Parameters
[in]p_nameThe registering name.
[in]p_sectionsThe sections.

◆ SetCleaned()

C3D_API void Castor3D::Engine::SetCleaned ( )

Tells the engine is cleaned up.

Remarks
Thread-safe

◆ SetPerObjectLighting()

void Castor3D::Engine::SetPerObjectLighting ( bool  p_value)
inline

Sets the need for per object lighting.

Parameters
[in]p_valueThe new value.

◆ SupportsShaderModel()

C3D_API bool Castor3D::Engine::SupportsShaderModel ( eSHADER_MODEL  p_eShaderModel)

Checks the current support for given shader model.

Parameters
[in]p_eShaderModelThe shader model
Returns
true if the shader model is supported in actual configuration

◆ UnregisterParsers()

C3D_API void Castor3D::Engine::UnregisterParsers ( Castor::String const &  p_name)

Unregisters parsers for SceneFileParser.

Parameters
[in]p_nameThe registering name.

◆ UnregisterSections()

C3D_API void Castor3D::Engine::UnregisterSections ( Castor::String const &  p_name)

Unregisters sections for SceneFileParser.

Parameters
[in]p_nameThe registering name.

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