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

Class for object. More...

#include <Object.hpp>

+ Collaboration diagram for ven::Object:

Public Types

using Map = std::unordered_map<unsigned int, Object>
 

Public Member Functions

 Object (const unsigned int objId)
 
 ~Object ()=default
 
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=default
 
Objectoperator= (Object &&)=default
 
unsigned int getId () const
 
std::string getName () const
 
std::shared_ptr< ModelgetModel () const
 
std::shared_ptr< TexturegetDiffuseMap () const
 
VkDescriptorBufferInfo getBufferInfo (const int frameIndex) const
 
void setModel (const std::shared_ptr< Model > &model)
 
void setDiffuseMap (const std::shared_ptr< Texture > &diffuseMap)
 
void setName (const std::string &name)
 
void setBufferInfo (const int frameIndex, const VkDescriptorBufferInfo &info)
 

Public Attributes

Transform3D transform {}
 

Private Attributes

unsigned int m_objId
 
std::string m_name
 
std::shared_ptr< Modelm_model = nullptr
 
std::shared_ptr< Texturem_diffuseMap = nullptr
 
std::unordered_map< int, VkDescriptorBufferInfo > m_bufferInfo
 

Detailed Description

Class for object.

Definition at line 24 of file Object.hpp.

Member Typedef Documentation

◆ Map

using ven::Object::Map = std::unordered_map<unsigned int, Object>

Definition at line 28 of file Object.hpp.

Constructor & Destructor Documentation

◆ Object() [1/3]

ven::Object::Object ( const unsigned int objId)
inlineexplicit

Definition at line 30 of file Object.hpp.

◆ ~Object()

ven::Object::~Object ( )
default

◆ Object() [2/3]

ven::Object::Object ( const Object & )
delete

◆ Object() [3/3]

ven::Object::Object ( Object && )
default

Member Function Documentation

◆ getBufferInfo()

VkDescriptorBufferInfo ven::Object::getBufferInfo ( const int frameIndex) const
inlinenodiscard

Definition at line 43 of file Object.hpp.

References m_bufferInfo.

◆ getDiffuseMap()

std::shared_ptr< Texture > ven::Object::getDiffuseMap ( ) const
inlinenodiscard

Definition at line 42 of file Object.hpp.

References m_diffuseMap.

Referenced by ven::ObjectFactory::duplicate().

+ Here is the caller graph for this function:

◆ getId()

unsigned int ven::Object::getId ( ) const
inlinenodiscard

Definition at line 39 of file Object.hpp.

References m_objId.

◆ getModel()

std::shared_ptr< Model > ven::Object::getModel ( ) const
inlinenodiscard

Definition at line 41 of file Object.hpp.

References m_model.

Referenced by ven::ObjectFactory::duplicate().

+ Here is the caller graph for this function:

◆ getName()

std::string ven::Object::getName ( ) const
inlinenodiscard

Definition at line 40 of file Object.hpp.

References m_name.

Referenced by ven::ObjectFactory::duplicate().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

Object & ven::Object::operator= ( Object && )
default

◆ setBufferInfo()

void ven::Object::setBufferInfo ( const int frameIndex,
const VkDescriptorBufferInfo & info )
inline

Definition at line 47 of file Object.hpp.

References m_bufferInfo.

◆ setDiffuseMap()

void ven::Object::setDiffuseMap ( const std::shared_ptr< Texture > & diffuseMap)
inline

Definition at line 45 of file Object.hpp.

References m_diffuseMap.

◆ setModel()

void ven::Object::setModel ( const std::shared_ptr< Model > & model)
inline

Definition at line 44 of file Object.hpp.

References m_model.

◆ setName()

void ven::Object::setName ( const std::string & name)
inline

Definition at line 46 of file Object.hpp.

References m_name.

Member Data Documentation

◆ m_bufferInfo

std::unordered_map<int, VkDescriptorBufferInfo> ven::Object::m_bufferInfo
private

Definition at line 57 of file Object.hpp.

Referenced by getBufferInfo(), and setBufferInfo().

◆ m_diffuseMap

std::shared_ptr<Texture> ven::Object::m_diffuseMap = nullptr
private

Definition at line 56 of file Object.hpp.

Referenced by getDiffuseMap(), and setDiffuseMap().

◆ m_model

std::shared_ptr<Model> ven::Object::m_model = nullptr
private

Definition at line 55 of file Object.hpp.

Referenced by getModel(), and setModel().

◆ m_name

std::string ven::Object::m_name
private

Definition at line 54 of file Object.hpp.

Referenced by getName(), and setName().

◆ m_objId

unsigned int ven::Object::m_objId
private

Definition at line 53 of file Object.hpp.

Referenced by getId().

◆ transform

Transform3D ven::Object::transform {}

Definition at line 49 of file Object.hpp.

Referenced by ven::ObjectFactory::duplicate().


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