vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
Object.cpp
Go to the documentation of this file.
2
4
5std::unique_ptr<ven::Object> ven::ObjectFactory::create(const std::shared_ptr<Texture>& texture, const std::shared_ptr<Model>& model, const std::string &name, const Transform3D &transform)
6{
7 assert(m_currentObjId < MAX_OBJECTS && "Max object count exceeded!");
8 auto object = std::make_unique<Object>(++m_currentObjId);
9 object->setDiffuseMap(texture);
10 object->setModel(model);
11 object->setName(name);
12 object->transform = transform;
13 return object;
14}
This file contains the Object Factory class.
static unsigned int m_currentObjId
Definition Object.hpp:35
static std::unique_ptr< Object > create(const std::shared_ptr< Texture > &texture, const std::shared_ptr< Model > &model, const std::string &name, const Transform3D &transform)
Definition Object.cpp:5
Class for 3D transformation.
static constexpr uint16_t MAX_OBJECTS
Definition Object.hpp:17