cache system add lonely functionnality

This commit is contained in:
arthur.jamet
2021-06-09 11:14:53 +02:00
parent aab9477571
commit 70524fa935
13 changed files with 46 additions and 27 deletions
+2 -2
View File
@@ -19,9 +19,9 @@ namespace RAY::Drawables::Drawables3D {
const RAY::Vector3 &scale,
const RAY::Vector3 &position,
const RAY::Vector3 &rotationAxis,
float rotationAngle)
float rotationAngle, bool lonely)
: ADrawable3D(position, WHITE),
_model(_modelsCache.fetch(filename)),
_model(_modelsCache.fetch(filename, lonely)),
_rotationAxis(rotationAxis),
_rotationAngle(rotationAngle),
_scale(scale)
+2 -1
View File
@@ -25,12 +25,13 @@ namespace RAY::Drawables::Drawables3D {
//! @brief Create an model, loading a file
//! @param filePath: path to file to load
//! @param lonely: should be set to true if the entity's loaded data must be independant from others
Model(const std::string &filePath,
std::optional<std::pair<MaterialType, std::string>> texture = std::nullopt,
const RAY::Vector3 &scale = RAY::Vector3(1, 1, 1),
const RAY::Vector3 &position = {0, 0, 0},
const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0),
float rotationAngle = 0);
float rotationAngle = 0, bool lonely = false);
//! @brief Create an model, loading a file
//! @param mesh: mesh to load