vengine
0.0.1
3D graphics engine
Loading...
Searching...
No Matches
Object.cpp
Go to the documentation of this file.
1
#include "
VEngine/Factories/Object.hpp
"
2
3
unsigned
int
ven::ObjectFactory::m_currentObjId
= 0;
4
5
std::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
}
Object.hpp
This file contains the Object Factory class.
ven::ObjectFactory::m_currentObjId
static unsigned int m_currentObjId
Definition
Object.hpp:35
ven::ObjectFactory::create
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
ven::Transform3D
Class for 3D transformation.
Definition
Transform3D.hpp:18
ven::MAX_OBJECTS
static constexpr uint16_t MAX_OBJECTS
Definition
Object.hpp:17
src
Factories
Object.cpp
Generated by
1.11.0