|
Castor3D
..
|
Overlay collection, with additional add and remove functions to manage Z-Index. More...
Inheritance diagram for Castor3D::OverlayManager:
Collaboration diagram for Castor3D::OverlayManager:Public Types | |
| typedef Castor::Collection< Overlay, Castor::String >::TObjPtrMapIt | iterator |
| typedef Castor::Collection< Overlay, Castor::String >::TObjPtrMapConstIt | const_iterator |
| typedef std::set< OverlayCategorySPtr, OverlayCategorySort > | OverlayCategorySet |
Public Types inherited from Castor3D::Manager< Castor::String, Overlay, Engine, ResourceManagerEngineGetter > | |
| typedef Castor::Collection< Overlay, Castor::String > | Collection |
Public Member Functions | |
| DECLARE_MAP (Castor::String, FontTextureSPtr, FontTextureStr) | |
| C3D_API | OverlayManager (Engine &p_engine) |
| Constructor. More... | |
| C3D_API | ~OverlayManager () |
| Destructor. More... | |
| C3D_API void | Clear () |
| Clears all overlays lists. More... | |
| C3D_API void | Cleanup () |
| Cleans all overlays up. More... | |
| C3D_API void | Remove (Castor::String const &p_name) |
| Removes an overlay from the lists. More... | |
| C3D_API OverlaySPtr | Create (Castor::String const &p_name, eOVERLAY_TYPE p_type, OverlaySPtr p_parent, SceneSPtr p_scene) |
| Creates an overlay, given a type and the overlay definitions. More... | |
| C3D_API PanelOverlaySPtr | CreatePanel (Castor::String const &p_name, Castor::Point2d const &p_position, Castor::Point2d const &p_size, MaterialSPtr p_material, OverlaySPtr p_parent=nullptr) |
| Creates a panel overlay. More... | |
| C3D_API PanelOverlaySPtr | CreatePanel (Castor::String const &p_name, Castor::Position const &p_position, Castor::Size const &p_size, MaterialSPtr p_material, OverlaySPtr p_parent=nullptr) |
| Creates a panel overlay. More... | |
| C3D_API BorderPanelOverlaySPtr | CreateBorderPanel (Castor::String const &p_name, Castor::Point2d const &p_position, Castor::Point2d const &p_size, MaterialSPtr p_material, Castor::Point4d const &p_bordersSize, MaterialSPtr p_bordersMaterial, OverlaySPtr p_parent=nullptr) |
| Creates a border panel overlay. More... | |
| C3D_API BorderPanelOverlaySPtr | CreateBorderPanel (Castor::String const &p_name, Castor::Position const &p_position, Castor::Size const &p_size, MaterialSPtr p_material, Castor::Rectangle const &p_bordersSize, MaterialSPtr p_bordersMaterial, OverlaySPtr p_parent=nullptr) |
| Creates a panel overlay. More... | |
| C3D_API TextOverlaySPtr | CreateText (Castor::String const &p_name, Castor::Point2d const &p_position, Castor::Point2d const &p_size, MaterialSPtr p_material, Castor::FontSPtr p_font, OverlaySPtr p_parent=nullptr) |
| Creates a text overlay. More... | |
| C3D_API TextOverlaySPtr | CreateText (Castor::String const &p_name, Castor::Position const &p_position, Castor::Size const &p_size, MaterialSPtr p_material, Castor::FontSPtr p_font, OverlaySPtr p_parent=nullptr) |
| Creates a text overlay. More... | |
| C3D_API void | UpdateRenderer () |
| Initialises or cleans up the OverlayRenderer, according to engine rendering status. More... | |
| C3D_API void | Update () |
| Updates overlays. More... | |
| C3D_API void | Render (Scene const &p_scene, Castor::Size const &p_size) |
| Renders all visible overlays. More... | |
| C3D_API bool | Write (Castor::TextFile &p_file) const |
| Writes overlays in a text file. More... | |
| C3D_API bool | Read (Castor::TextFile &p_file) |
| Reads overlays from a text file. More... | |
| C3D_API bool | Save (Castor::BinaryFile &p_file) const |
| Writes overlays in a binary file. More... | |
| C3D_API bool | Load (Castor::BinaryFile &p_file) |
| Reads overlays from a binary file. More... | |
| C3D_API FontTextureSPtr | GetFontTexture (Castor::String const &p_name) |
| Retrieves a FontTexture given a font name. More... | |
| C3D_API FontTextureSPtr | CreateFontTexture (Castor::FontSPtr p_font) |
| Creates a FontTexture from a font. More... | |
| OverlayRendererSPtr | GetRenderer () const |
| Retrieves the overlay renderer. More... | |
| OverlayCategorySet::iterator | begin () |
| Retrieves an iterator to the first overlay. More... | |
| OverlayCategorySet::const_iterator | begin () const |
| Retrieves an iterator to the first overlay. More... | |
| OverlayCategorySet::iterator | end () |
| Retrieves an iterator to after the last overlay. More... | |
| OverlayCategorySet::const_iterator | end () const |
| Retrieves an iterator to after the last overlay. More... | |
| OverlayFactory const & | GetOverlayFactory () const |
| Retrieves the Overlay factory. More... | |
| OverlayFactory & | GetFactory () |
| Retrieves the Overlay factory. More... | |
Public Member Functions inherited from Castor3D::Manager< Castor::String, Overlay, Engine, ResourceManagerEngineGetter > | |
| void | Cleanup () |
| Sets all the elements to be cleaned up. More... | |
| void | Clear () |
| Flushes the collection. More... | |
| bool | IsEmpty () |
| void | Insert (Castor::String const &p_name, std::shared_ptr< Overlay > p_element) |
| Removes an object, given a name. More... | |
| void | Remove (Castor::String const &p_name) |
| Removes an object, given a name. More... | |
| void | SetRenderSystem (RenderSystem *p_renderSystem) |
| RenderSystem * | SetRenderSystem () const |
| Engine * | GetEngine () const |
| Castor::String const & | GetObjectTypeName () const |
| bool | Has (Castor::String const &p_name) const |
| std::shared_ptr< Overlay > | Find (Castor::String const &p_name) const |
| Looks for an element with given name. More... | |
| void | lock () const |
| Locks the collection mutex. More... | |
| void | unlock () const |
| Unlocks the collection mutex. More... | |
| Collection::TObjPtrMapIt | begin () |
| Returns an iterator to the first element of the collection. More... | |
| Collection::TObjPtrMapConstIt | begin () const |
| Returns an constant iterator to the first element of the collection. More... | |
| Collection::TObjPtrMapIt | end () |
| Returns an iterator to the after last element of the collection. More... | |
| Collection::TObjPtrMapConstIt | end () const |
| Returns an constant iterator to the after last element of the collection. More... | |
| std::shared_ptr< Overlay > | Create (Castor::String const &p_name, Parameters &&... p_params) |
| Creates an object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Castor3D::ResourceManager< Castor::String, Overlay > | |
| ResourceManager (Engine &p_owner) | |
| Constructor. More... | |
| ~ResourceManager () | |
| Destructor. More... | |
Protected Member Functions inherited from Castor3D::Manager< Castor::String, Overlay, Engine, ResourceManagerEngineGetter > | |
| Manager (Engine &p_owner) | |
| Constructor. More... | |
| ~Manager () | |
| Destructor. More... | |
Protected Attributes inherited from Castor3D::Manager< Castor::String, Overlay, Engine, ResourceManagerEngineGetter > | |
| RenderSystem * | m_renderSystem |
| The RenderSystem. More... | |
| Collection | m_elements |
| The elements collection. More... | |
Overlay collection, with additional add and remove functions to manage Z-Index.
| typedef Castor::Collection< Overlay, Castor::String >::TObjPtrMapConstIt Castor3D::OverlayManager::const_iterator |
| typedef Castor::Collection< Overlay, Castor::String >::TObjPtrMapIt Castor3D::OverlayManager::iterator |
| typedef std::set< OverlayCategorySPtr, OverlayCategorySort > Castor3D::OverlayManager::OverlayCategorySet |
| C3D_API Castor3D::OverlayManager::OverlayManager | ( | Engine & | p_engine | ) |
Constructor.
| C3D_API Castor3D::OverlayManager::~OverlayManager | ( | ) |
Destructor.
|
inline |
Retrieves an iterator to the first overlay.
|
inline |
Retrieves an iterator to the first overlay.
| C3D_API void Castor3D::OverlayManager::Cleanup | ( | ) |
Cleans all overlays up.
| C3D_API void Castor3D::OverlayManager::Clear | ( | ) |
Clears all overlays lists.
| C3D_API OverlaySPtr Castor3D::OverlayManager::Create | ( | Castor::String const & | p_name, |
| eOVERLAY_TYPE | p_type, | ||
| OverlaySPtr | p_parent, | ||
| SceneSPtr | p_scene | ||
| ) |
Creates an overlay, given a type and the overlay definitions.
| [in] | p_type | The overlay type (panel, text ...) |
| [in] | p_name | The overlay name |
| [in] | p_parent | The parent overlay, nullptr if none |
| [in] | p_scene | The scene that holds the overlay |
| C3D_API BorderPanelOverlaySPtr Castor3D::OverlayManager::CreateBorderPanel | ( | Castor::String const & | p_name, |
| Castor::Point2d const & | p_position, | ||
| Castor::Point2d const & | p_size, | ||
| MaterialSPtr | p_material, | ||
| Castor::Point4d const & | p_bordersSize, | ||
| MaterialSPtr | p_bordersMaterial, | ||
| OverlaySPtr | p_parent = nullptr |
||
| ) |
Creates a border panel overlay.
| [in] | p_name | The overlay name. |
| [in] | p_position | The position, relative to parent, or screen, if no parent. |
| [in] | p_size | The size, relative to parent, or screen, if no parent. |
| [in] | p_material | The overlay material. |
| [in] | p_bordersSize | The overlay borders size. |
| [in] | p_bordersMaterial | The overlay borders material. |
| [in] | p_parent | The parent overlay. |
| C3D_API BorderPanelOverlaySPtr Castor3D::OverlayManager::CreateBorderPanel | ( | Castor::String const & | p_name, |
| Castor::Position const & | p_position, | ||
| Castor::Size const & | p_size, | ||
| MaterialSPtr | p_material, | ||
| Castor::Rectangle const & | p_bordersSize, | ||
| MaterialSPtr | p_bordersMaterial, | ||
| OverlaySPtr | p_parent = nullptr |
||
| ) |
Creates a panel overlay.
| [in] | p_name | The overlay name. |
| [in] | p_position | The position in pixels, inside the parent, or screen if no parent. |
| [in] | p_size | The absolute size in pixels. |
| [in] | p_material | The overlay material. |
| [in] | p_bordersSize | The overlay borders pixel size. |
| [in] | p_bordersMaterial | The overlay borders material. |
| [in] | p_parent | The parent overlay. |
| [in] | p_name | Le nom de l'incrustation. |
| [in] | p_position | La position en pixels, dans le parent, ou l'écran, si pas de parent. |
| [in] | p_size | La taille absolue, en pixels. |
| [in] | p_material | Le matériau de l'incrustation. |
| [in] | p_bordersSize | Les dimensions des bords de l'incrustation. |
| [in] | p_bordersMaterial | Le matériau des bordures de l'incrustation. |
| [in] | p_parent | L'incrustation parente. |
| C3D_API FontTextureSPtr Castor3D::OverlayManager::CreateFontTexture | ( | Castor::FontSPtr | p_font | ) |
| C3D_API PanelOverlaySPtr Castor3D::OverlayManager::CreatePanel | ( | Castor::String const & | p_name, |
| Castor::Point2d const & | p_position, | ||
| Castor::Point2d const & | p_size, | ||
| MaterialSPtr | p_material, | ||
| OverlaySPtr | p_parent = nullptr |
||
| ) |
Creates a panel overlay.
| [in] | p_name | The overlay name. |
| [in] | p_position | The position, relative to parent, or screen, if no parent. |
| [in] | p_size | The size, relative to parent, or screen, if no parent. |
| [in] | p_material | The overlay material. |
| [in] | p_parent | The parent overlay. |
| C3D_API PanelOverlaySPtr Castor3D::OverlayManager::CreatePanel | ( | Castor::String const & | p_name, |
| Castor::Position const & | p_position, | ||
| Castor::Size const & | p_size, | ||
| MaterialSPtr | p_material, | ||
| OverlaySPtr | p_parent = nullptr |
||
| ) |
Creates a panel overlay.
| [in] | p_name | The overlay name. |
| [in] | p_position | The position in pixels, inside the parent, or screen if no parent. |
| [in] | p_size | The absolute size in pixels. |
| [in] | p_material | The overlay material. |
| [in] | p_parent | The parent overlay. |
| C3D_API TextOverlaySPtr Castor3D::OverlayManager::CreateText | ( | Castor::String const & | p_name, |
| Castor::Point2d const & | p_position, | ||
| Castor::Point2d const & | p_size, | ||
| MaterialSPtr | p_material, | ||
| Castor::FontSPtr | p_font, | ||
| OverlaySPtr | p_parent = nullptr |
||
| ) |
Creates a text overlay.
| [in] | p_name | The overlay name. |
| [in] | p_position | The position, relative to parent, or screen, if no parent. |
| [in] | p_size | The size, relative to parent, or screen, if no parent. |
| [in] | p_material | The overlay material. |
| [in] | p_font | The font used to display the text. |
| [in] | p_parent | The parent overlay. |
| C3D_API TextOverlaySPtr Castor3D::OverlayManager::CreateText | ( | Castor::String const & | p_name, |
| Castor::Position const & | p_position, | ||
| Castor::Size const & | p_size, | ||
| MaterialSPtr | p_material, | ||
| Castor::FontSPtr | p_font, | ||
| OverlaySPtr | p_parent = nullptr |
||
| ) |
Creates a text overlay.
| [in] | p_name | The overlay name. |
| [in] | p_position | The position in pixels, inside the parent, or screen if no parent. |
| [in] | p_size | The absolute size in pixels. |
| [in] | p_material | The overlay material. |
| [in] | p_font | The font used to display the text. |
| [in] | p_parent | The parent overlay. |
| Castor3D::OverlayManager::DECLARE_MAP | ( | Castor::String | , |
| FontTextureSPtr | , | ||
| FontTextureStr | |||
| ) |
|
inline |
Retrieves an iterator to after the last overlay.
|
inline |
Retrieves an iterator to after the last overlay.
|
inline |
Retrieves the Overlay factory.
| C3D_API FontTextureSPtr Castor3D::OverlayManager::GetFontTexture | ( | Castor::String const & | p_name | ) |
Retrieves a FontTexture given a font name.
| [in] | p_name | The font name. |
|
inline |
Retrieves the Overlay factory.
|
inline |
Retrieves the overlay renderer.
| C3D_API bool Castor3D::OverlayManager::Load | ( | Castor::BinaryFile & | p_file | ) |
Reads overlays from a binary file.
| [in] | p_file | The file |
true if ok | C3D_API bool Castor3D::OverlayManager::Read | ( | Castor::TextFile & | p_file | ) |
Reads overlays from a text file.
| [in] | p_file | The file |
true if ok | C3D_API void Castor3D::OverlayManager::Remove | ( | Castor::String const & | p_name | ) |
Removes an overlay from the lists.
| [in] | p_name | The overlay name. |
| C3D_API void Castor3D::OverlayManager::Render | ( | Scene const & | p_scene, |
| Castor::Size const & | p_size | ||
| ) |
Renders all visible overlays.
| [in] | p_scene | The scene displayed, to display its overlays and the global ones |
| [in] | p_size | The render target size |
| C3D_API bool Castor3D::OverlayManager::Save | ( | Castor::BinaryFile & | p_file | ) | const |
Writes overlays in a binary file.
| [out] | p_file | The file |
true if ok | C3D_API void Castor3D::OverlayManager::Update | ( | ) |
Updates overlays.
| C3D_API void Castor3D::OverlayManager::UpdateRenderer | ( | ) |
Initialises or cleans up the OverlayRenderer, according to engine rendering status.
| C3D_API bool Castor3D::OverlayManager::Write | ( | Castor::TextFile & | p_file | ) | const |
Writes overlays in a text file.
| [out] | p_file | The file |
true if ok
1.8.15