vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
ven::SceneManager Class Reference

Class for object manager. More...

#include <Manager.hpp>

+ Collaboration diagram for ven::SceneManager:

Public Member Functions

 SceneManager (Device &device)
 
 SceneManager (const SceneManager &)=delete
 
SceneManageroperator= (const SceneManager &)=delete
 
 SceneManager (SceneManager &&)=delete
 
SceneManageroperator= (SceneManager &&)=delete
 
void addObject (const std::unique_ptr< Object > &object)
 
void addLight (const std::unique_ptr< Light > &light)
 
void destroyObject (const unsigned int objectId)
 
void destroyLight (const unsigned int lightId)
 
void destroyEntity (std::vector< unsigned int > *objectsIds, std::vector< unsigned int > *lightsIds)
 
void updateBuffer (GlobalUbo &ubo, unsigned long frameIndex, float frameTime)
 
VkDescriptorBufferInfo getBufferInfoForObject (const int frameIndex, const unsigned int objectId) const
 
Object::MapgetObjects ()
 
Light::MapgetLights ()
 
std::vector< std::unique_ptr< Buffer > > & getUboBuffers ()
 
std::shared_ptr< TexturegetTextureDefault ()
 
bool getDestroyState () const
 
void setDestroyState (const bool state)
 

Private Attributes

unsigned int m_currentObjId {0}
 
unsigned int m_currentLightId {0}
 
std::shared_ptr< Texturem_textureDefault
 
Object::Map m_objects
 
Light::Map m_lights
 
std::vector< std::unique_ptr< Buffer > > m_uboBuffers {MAX_FRAMES_IN_FLIGHT}
 
bool m_destroyState {false}
 

Detailed Description

Class for object manager.

Definition at line 19 of file Manager.hpp.

Constructor & Destructor Documentation

◆ SceneManager() [1/3]

ven::SceneManager::SceneManager ( Device & device)
explicit

Definition at line 7 of file manager.cpp.

References ven::TextureFactory::create(), ven::Device::getProperties(), ven::Logger::logExecutionTime(), m_textureDefault, m_uboBuffers, and ven::MAX_OBJECTS.

+ Here is the call graph for this function:

◆ SceneManager() [2/3]

ven::SceneManager::SceneManager ( const SceneManager & )
delete

◆ SceneManager() [3/3]

ven::SceneManager::SceneManager ( SceneManager && )
delete

Member Function Documentation

◆ addLight()

void ven::SceneManager::addLight ( const std::unique_ptr< Light > & light)
inline

Definition at line 31 of file Manager.hpp.

References m_lights.

◆ addObject()

void ven::SceneManager::addObject ( const std::unique_ptr< Object > & object)
inline

Definition at line 30 of file Manager.hpp.

References m_objects.

◆ destroyEntity()

void ven::SceneManager::destroyEntity ( std::vector< unsigned int > * objectsIds,
std::vector< unsigned int > * lightsIds )

Definition at line 54 of file manager.cpp.

◆ destroyLight()

void ven::SceneManager::destroyLight ( const unsigned int lightId)
inline

Definition at line 34 of file Manager.hpp.

References m_lights.

◆ destroyObject()

void ven::SceneManager::destroyObject ( const unsigned int objectId)
inline

Definition at line 33 of file Manager.hpp.

References m_objects.

◆ getBufferInfoForObject()

VkDescriptorBufferInfo ven::SceneManager::getBufferInfoForObject ( const int frameIndex,
const unsigned int objectId ) const
inlinenodiscard

Definition at line 39 of file Manager.hpp.

References m_uboBuffers.

◆ getDestroyState()

bool ven::SceneManager::getDestroyState ( ) const
inlinenodiscard

Definition at line 44 of file Manager.hpp.

References m_destroyState.

◆ getLights()

Light::Map & ven::SceneManager::getLights ( )
inline

Definition at line 41 of file Manager.hpp.

References m_lights.

Referenced by ven::Gui::lightsSection().

+ Here is the caller graph for this function:

◆ getObjects()

Object::Map & ven::SceneManager::getObjects ( )
inline

Definition at line 40 of file Manager.hpp.

References m_objects.

Referenced by ven::Gui::objectsSection().

+ Here is the caller graph for this function:

◆ getTextureDefault()

std::shared_ptr< Texture > ven::SceneManager::getTextureDefault ( )
inline

Definition at line 43 of file Manager.hpp.

References m_textureDefault.

◆ getUboBuffers()

std::vector< std::unique_ptr< Buffer > > & ven::SceneManager::getUboBuffers ( )
inline

Definition at line 42 of file Manager.hpp.

References m_uboBuffers.

◆ operator=() [1/2]

SceneManager & ven::SceneManager::operator= ( const SceneManager & )
delete

◆ operator=() [2/2]

SceneManager & ven::SceneManager::operator= ( SceneManager && )
delete

◆ setDestroyState()

void ven::SceneManager::setDestroyState ( const bool state)
inline

Definition at line 46 of file Manager.hpp.

References m_destroyState.

Referenced by ven::Gui::lightsSection(), and ven::Gui::objectsSection().

+ Here is the caller graph for this function:

◆ updateBuffer()

void ven::SceneManager::updateBuffer ( GlobalUbo & ubo,
unsigned long frameIndex,
float frameTime )

Member Data Documentation

◆ m_currentLightId

unsigned int ven::SceneManager::m_currentLightId {0}
private

Definition at line 51 of file Manager.hpp.

◆ m_currentObjId

unsigned int ven::SceneManager::m_currentObjId {0}
private

Definition at line 50 of file Manager.hpp.

◆ m_destroyState

bool ven::SceneManager::m_destroyState {false}
private

Definition at line 56 of file Manager.hpp.

Referenced by getDestroyState(), and setDestroyState().

◆ m_lights

Light::Map ven::SceneManager::m_lights
private

Definition at line 54 of file Manager.hpp.

Referenced by addLight(), destroyLight(), and getLights().

◆ m_objects

Object::Map ven::SceneManager::m_objects
private

Definition at line 53 of file Manager.hpp.

Referenced by addObject(), destroyObject(), and getObjects().

◆ m_textureDefault

std::shared_ptr<Texture> ven::SceneManager::m_textureDefault
private

Definition at line 52 of file Manager.hpp.

Referenced by getTextureDefault(), and SceneManager().

◆ m_uboBuffers

std::vector<std::unique_ptr<Buffer> > ven::SceneManager::m_uboBuffers {MAX_FRAMES_IN_FLIGHT}
private

Definition at line 55 of file Manager.hpp.

Referenced by getBufferInfoForObject(), getUboBuffers(), and SceneManager().


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